mirror of
https://github.com/glimpse-app/server.git
synced 2025-04-02 10:52:45 -04:00
fixed #24 file path being deleted before deleting the file itself
This commit is contained in:
parent
b28d8ab88a
commit
cf0a8b7f73
1 changed files with 1 additions and 1 deletions
|
@ -64,10 +64,10 @@ proc createDeletionRoutes*(cfg: Cfg) =
|
|||
except NotFoundError:
|
||||
resp Http404, "File does not exist.\n"
|
||||
|
||||
removeFile(file.path)
|
||||
db.delete(file)
|
||||
dec user.fileCount
|
||||
db.update(user)
|
||||
removeFile(file.path)
|
||||
resp Http200, "[]\n", "application/json"
|
||||
|
||||
#[
|
||||
|
|
Loading…
Add table
Reference in a new issue