mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2025-12-22 11:17:18 -05:00
refactor: change theme.key to theme.id (#347)
BREAKING CHANGE: Change property to `id`
This commit is contained in:
committed by
GitHub
parent
7ac87a9ea6
commit
1b74e0724f
@@ -86,12 +86,12 @@ module.exports = async ({
|
||||
}
|
||||
|
||||
app.get('/themes', (req, res) => {
|
||||
const arr = themes.map(theme => theme.key);
|
||||
const arr = themes.map(theme => theme.id);
|
||||
res.json(arr);
|
||||
});
|
||||
|
||||
app.get('/theme/:id', (req, res) => {
|
||||
const t = themes.filter(theme => theme.key === req.params.id)[0];
|
||||
const t = themes.filter(theme => theme.id === req.params.id)[0];
|
||||
if (!t) {
|
||||
res.sendStatus('404');
|
||||
} else {
|
||||
@@ -110,7 +110,7 @@ module.exports = async ({
|
||||
sock: {
|
||||
port: entryWatcher && entryWatcher.port,
|
||||
},
|
||||
themes: themes.map(theme => theme.key),
|
||||
themes: themes.map(theme => theme.id),
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user