Skip to content

Commit

Permalink
adjust user actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ninori9 committed Jan 6, 2025
1 parent 635e5a5 commit df3f6d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/services/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export class UserService {
* Get all users for the authenticated organisation.
*/
getAllUsers(isAdmin: boolean): Observable<User[]> {
console.log(isAdmin);
const headers = this.createAuthHeaders();
return this.http
.get<UserDTO[]>(`${environment.backendUrl}/users`, { headers })
Expand Down Expand Up @@ -103,6 +104,6 @@ export class UserService {
}

private getActions(dto: UserDTO): string[] {
return [dto.isApproved ? "revoke" : "approve", "setAdmin"];
return [! dto.isApproved ? "approve" : "setAdmin"];
}
}

0 comments on commit df3f6d0

Please sign in to comment.