1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00

refactor: remove active-sessions endpoint (#1690)

This commit is contained in:
olav 2022-06-09 13:19:20 +02:00 committed by GitHub
parent 138300ab22
commit 0f11a33e3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,7 +81,6 @@ export default class UserAdminController extends Controller {
this.post('/:id/change-password', this.changePassword, ADMIN);
this.delete('/:id', this.deleteUser, ADMIN);
this.post('/reset-password', this.resetPassword, ADMIN);
this.get('/active-sessions', this.getActiveSessions, ADMIN);
}
async resetPassword(req: IAuthRequest, res: Response): Promise<void> {
@ -105,11 +104,6 @@ export default class UserAdminController extends Controller {
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[] {
return users.map((u) => ({
...u,