Skip to content

Commit

Permalink
api: Make sure to mark deleted instead of delete assets
Browse files Browse the repository at this point in the history
  • Loading branch information
victorges committed Jul 20, 2022
1 parent 52fdf68 commit bb444cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api/src/controllers/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ app.delete("/:id", authorizer({}), async (req, res) => {
if (!req.user.admin && req.user.id !== asset.userId) {
throw new ForbiddenError(`users may only delete their own assets`);
}
await db.asset.delete(id);
await db.asset.markDeleted(id);
res.status(204);
res.end();
});
Expand Down

0 comments on commit bb444cf

Please sign in to comment.