Skip to content

Commit

Permalink
Apply suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
0417taehyun committed Nov 14, 2024
1 parent 4dbba4c commit a6351c5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib/routes/admin-api/user-admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,16 +621,16 @@ export default class UserAdminController extends Controller {
const { id } = params;
const { name, email, rootRole } = body;

await this.throwIfScimUser({ id: id });
await this.throwIfScimUser({ id });
const normalizedRootRole = Number.isInteger(Number(rootRole))
? Number(rootRole)
: (rootRole as RoleName);

const updateUser = await this.userService.updateUser(
{
id: id,
name: name,
email: email,
id,
name,
email,
rootRole: normalizedRootRole,
},
req.audit,
Expand All @@ -654,7 +654,7 @@ export default class UserAdminController extends Controller {
const { user, params } = req;
const { id } = params;

await this.throwIfScimUser({ id: id });
await this.throwIfScimUser({ id });

await this.userService.deleteUser(+id, req.audit);
res.status(200).send();
Expand All @@ -677,7 +677,7 @@ export default class UserAdminController extends Controller {
const { id } = req.params;
const { password } = req.body;

await this.throwIfScimUser({ id: id });
await this.throwIfScimUser({ id });

await this.userService.changePassword(+id, password);
res.status(200).send();
Expand Down

0 comments on commit a6351c5

Please sign in to comment.