mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-14 00:19:16 +01:00
refactor: remove active-sessions endpoint (#1690)
This commit is contained in:
parent
138300ab22
commit
0f11a33e3a
@ -81,7 +81,6 @@ export default class UserAdminController extends Controller {
|
|||||||
this.post('/:id/change-password', this.changePassword, ADMIN);
|
this.post('/:id/change-password', this.changePassword, ADMIN);
|
||||||
this.delete('/:id', this.deleteUser, ADMIN);
|
this.delete('/:id', this.deleteUser, ADMIN);
|
||||||
this.post('/reset-password', this.resetPassword, ADMIN);
|
this.post('/reset-password', this.resetPassword, ADMIN);
|
||||||
this.get('/active-sessions', this.getActiveSessions, ADMIN);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async resetPassword(req: IAuthRequest, res: Response): Promise<void> {
|
async resetPassword(req: IAuthRequest, res: Response): Promise<void> {
|
||||||
@ -105,11 +104,6 @@ export default class UserAdminController extends Controller {
|
|||||||
res.json({ users: usersWithInviteLinks, rootRoles });
|
res.json({ users: usersWithInviteLinks, rootRoles });
|
||||||
}
|
}
|
||||||
|
|
||||||
async getActiveSessions(req: Request, res: Response): Promise<void> {
|
|
||||||
const sessions = await this.sessionService.getActiveSessions();
|
|
||||||
res.json(sessions);
|
|
||||||
}
|
|
||||||
|
|
||||||
anonymiseUsers(users: IUser[]): IUser[] {
|
anonymiseUsers(users: IUser[]): IUser[] {
|
||||||
return users.map((u) => ({
|
return users.map((u) => ({
|
||||||
...u,
|
...u,
|
||||||
|
Loading…
Reference in New Issue
Block a user