Merge branch 'develop' into adiDev
This commit is contained in:
commit
abd8327d17
2 changed files with 19 additions and 9 deletions
|
|
@ -88,7 +88,8 @@ export class KeycloakController extends Controller {
|
|||
});
|
||||
|
||||
if (typeof userId !== "string") {
|
||||
throw new Error("ไม่สามารถติดต่อกับระบบจัดการผู้ใช้งานได้");
|
||||
// throw new Error("ไม่สามารถติดต่อกับระบบจัดการผู้ใช้งานได้");
|
||||
throw new Error(userId.errorMessage);
|
||||
}
|
||||
|
||||
const now = new Date().toISOString();
|
||||
|
|
@ -140,9 +141,15 @@ export class KeycloakController extends Controller {
|
|||
firstName?: string;
|
||||
lastName?: string;
|
||||
email?: string;
|
||||
attributes?: object
|
||||
},
|
||||
) {
|
||||
return await editUser(userId, body);
|
||||
// return await editUser(userId, body);
|
||||
const chkUpdate = await editUser(userId, body);
|
||||
if (typeof chkUpdate !== "boolean") {
|
||||
throw new Error(chkUpdate.errorMessage);
|
||||
}
|
||||
return chkUpdate
|
||||
}
|
||||
|
||||
@Delete("user/{userId}")
|
||||
|
|
@ -191,8 +198,8 @@ export class KeycloakController extends Controller {
|
|||
}
|
||||
|
||||
@Get("user")
|
||||
async getUserList(@Query() search = "") {
|
||||
const result = await getUserList(search);
|
||||
async getUserList(@Query() first = "", @Query() max = "" ,@Query() search = "") {
|
||||
const result = await getUserList(first, max, search);
|
||||
|
||||
if (Array.isArray(result)) {
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue