fix return
This commit is contained in:
parent
e14aef7202
commit
30286317c6
1 changed files with 4 additions and 1 deletions
|
|
@ -319,6 +319,9 @@ export class KeycloakController extends Controller {
|
|||
@Put("user/{userId}/enableStatus/{status}")
|
||||
async changeEnableStatus(@Path() userId: string, @Path() status: boolean) {
|
||||
const result = await enableStatus(userId, status);
|
||||
if (!result) throw new Error("Failed. Cannot change enable status.");
|
||||
if (!result) {
|
||||
throw new Error("Failed. Cannot change enable status.");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue