mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-24 21:39:36 +02:00
Fixed bug with custom icons not working with apps
This commit is contained in:
parent
1220c56fc5
commit
426766225b
7 changed files with 31 additions and 39 deletions
|
@ -8,16 +8,10 @@ const loadConfig = require('../../utils/loadConfig');
|
|||
const createCategory = asyncWrapper(async (req, res, next) => {
|
||||
const { pinCategoriesByDefault: pinCategories } = await loadConfig();
|
||||
|
||||
let category;
|
||||
|
||||
if (pinCategories) {
|
||||
category = await Category.create({
|
||||
...req.body,
|
||||
isPinned: true,
|
||||
});
|
||||
} else {
|
||||
category = await Category.create(req.body);
|
||||
}
|
||||
const category = await Category.create({
|
||||
...req.body,
|
||||
isPinned: pinCategories,
|
||||
});
|
||||
|
||||
res.status(201).json({
|
||||
success: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue