fix: branch manager cannot create user
This commit is contained in:
parent
04ef94fee1
commit
78ce80b1a2
1 changed files with 1 additions and 1 deletions
|
|
@ -288,7 +288,7 @@ export class UserController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post()
|
@Post()
|
||||||
@Security("keycloak", ["system", "head_of_admin", "admin", "branch_admin"])
|
@Security("keycloak", ["system", "head_of_admin", "admin", "branch_admin", "branch_manager"])
|
||||||
async createUser(@Request() req: RequestWithUser, @Body() body: UserCreate) {
|
async createUser(@Request() req: RequestWithUser, @Body() body: UserCreate) {
|
||||||
const [province, district, subDistrict, branch, user] = await prisma.$transaction([
|
const [province, district, subDistrict, branch, user] = await prisma.$transaction([
|
||||||
prisma.province.findFirst({ where: { id: body.provinceId ?? undefined } }),
|
prisma.province.findFirst({ where: { id: body.provinceId ?? undefined } }),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue