Destoy files when destroying post (#62)

pull/63/head
Joaquin "Florius" Azcarate 4 years ago committed by GitHub
parent 6a6a2a3496
commit 8da6d62cea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -299,6 +299,11 @@ posts.delete("/:id", jwt, async (req: UserJwtRequest, res, next) => {
model: User,
as: "users",
attributes: ["id"]
},
{
model: File,
as: "files",
attributes: ["id"]
}
]
})

Loading…
Cancel
Save