fix: also delete user in keycloak when delete user
This commit is contained in:
parent
194054422c
commit
326f7692c0
1 changed files with 3 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ import minio from "../services/minio";
|
|||
import { RequestWithUser } from "../interfaces/user";
|
||||
import HttpError from "../interfaces/http-error";
|
||||
import HttpStatus from "../interfaces/http-status";
|
||||
import { createUser } from "../services/keycloak";
|
||||
import { createUser, deleteUser } from "../services/keycloak";
|
||||
|
||||
if (!process.env.MINIO_BUCKET) {
|
||||
throw Error("Require MinIO bucket.");
|
||||
|
|
@ -412,6 +412,8 @@ export class UserController extends Controller {
|
|||
});
|
||||
});
|
||||
|
||||
await deleteUser(userId);
|
||||
|
||||
return await prisma.user.delete({
|
||||
include: {
|
||||
province: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue