Destoy files when destroying post (#62)
This commit is contained in:
parent
6a6a2a3496
commit
8da6d62cea
1 changed files with 5 additions and 0 deletions
|
@ -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…
Reference in a new issue