fix: image not on delete data
This commit is contained in:
parent
48c9fe1cfd
commit
88f84256cf
2 changed files with 7 additions and 0 deletions
|
|
@ -325,6 +325,10 @@ export class UserController extends Controller {
|
|||
throw new HttpError(HttpStatus.FORBIDDEN, "User is in used.", "data_in_used");
|
||||
}
|
||||
|
||||
await minio.removeObject(MINIO_BUCKET, imageLocation(userId), {
|
||||
forceDelete: true,
|
||||
});
|
||||
|
||||
return await prisma.user.delete({
|
||||
include: {
|
||||
province: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue