mirror of
https://github.com/pawelmalak/flame.git
synced 2025-08-02 01:15:17 +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
|
@ -19,20 +19,20 @@ const updateBookmark = asyncWrapper(async (req, res, next) => {
|
|||
);
|
||||
}
|
||||
|
||||
let _body = {
|
||||
let body = {
|
||||
...req.body,
|
||||
categoryId: parseInt(req.body.categoryId),
|
||||
};
|
||||
|
||||
if (_body.icon) {
|
||||
_body.icon = _body.icon.trim();
|
||||
if (body.icon) {
|
||||
body.icon = body.icon.trim();
|
||||
}
|
||||
|
||||
if (req.file) {
|
||||
_body.icon = req.file.filename;
|
||||
body.icon = req.file.filename;
|
||||
}
|
||||
|
||||
bookmark = await bookmark.update(_body);
|
||||
bookmark = await bookmark.update(body);
|
||||
|
||||
res.status(200).json({
|
||||
success: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue