delete comment
This commit is contained in:
parent
0c7c3361f6
commit
640668decb
3 changed files with 11 additions and 3 deletions
|
|
@ -42,11 +42,11 @@ export class LoginController extends Controller {
|
|||
_data = x;
|
||||
})
|
||||
.catch(async (x) => {
|
||||
throw new HttpError(HttpStatus.UNAUTHORIZED, "ชื่อผู้ใช้งานหรือรหัสผ่านไม่ถูกต้อง4");
|
||||
throw new HttpError(HttpStatus.UNAUTHORIZED, "ชื่อผู้ใช้งานหรือรหัสผ่านไม่ถูกต้อง");
|
||||
}),
|
||||
]);
|
||||
if (_data == null) {
|
||||
return new HttpError(HttpStatus.UNAUTHORIZED, "ชื่อผู้ใช้งานหรือรหัสผ่านไม่ถูกต้อง5");
|
||||
return new HttpError(HttpStatus.UNAUTHORIZED, "ชื่อผู้ใช้งานหรือรหัสผ่านไม่ถูกต้อง");
|
||||
} else {
|
||||
return new HttpSuccess(_data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,6 +107,14 @@ export class KeycloakController extends Controller {
|
|||
}
|
||||
const list = await getRoles();
|
||||
if (!Array.isArray(list)) throw new Error("Failed. Cannot get role(s) data from the server.");
|
||||
const result = await addUserRoles(
|
||||
userId,
|
||||
list.filter((v) => body.roles.includes(v.id)),
|
||||
);
|
||||
|
||||
if (!result) {
|
||||
throw new Error("Failed. Cannot set user's role.");
|
||||
}
|
||||
const profile = await this.profileRepo.findOne({
|
||||
where: {
|
||||
id: body.profileId,
|
||||
|
|
|
|||
|
|
@ -817,7 +817,7 @@ export class WorkflowController extends Controller {
|
|||
orgRootId: posMasterUser.orgRootId,
|
||||
};
|
||||
|
||||
if (type.trim().toLowerCase() == "OPERATE") {
|
||||
if (type.trim().toUpperCase() == "OPERATE") {
|
||||
} else {
|
||||
if (
|
||||
(posMasterUser.current_holder.posType.posTypeName == "ทั่วไป" &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue