fixed #24 file path being deleted before deleting the file itself

This commit is contained in:
array-in-a-matrix 2024-08-07 12:30:07 -04:00
parent b28d8ab88a
commit cf0a8b7f73

View file

@ -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"
#[