fix return facility on login
This commit is contained in:
@ -133,6 +133,8 @@ export class AuthController {
|
||||
where: {},
|
||||
})
|
||||
|
||||
log.info('the hospital facility', facility);
|
||||
|
||||
var privateKey = fs.readFileSync("src/helpers/key/private.key")
|
||||
|
||||
var token = jwt.sign(
|
||||
@ -146,7 +148,6 @@ export class AuthController {
|
||||
roles: roles.roles,
|
||||
hrms: hrms,
|
||||
rooms: rooms,
|
||||
facility: facility,
|
||||
},
|
||||
},
|
||||
privateKey,
|
||||
@ -159,6 +160,7 @@ export class AuthController {
|
||||
user: { ...user, ...hrms, rooms },
|
||||
role_name: roles.name,
|
||||
default_page: roles.default_page ?? null,
|
||||
facility: facility ?? null,
|
||||
roles_list: await AuthController.getListRole(roles.roles),
|
||||
token: {
|
||||
access_token: token,
|
||||
|
||||
Reference in New Issue
Block a user