Auth Methoden überarbeitet

This commit is contained in:
2024-08-26 11:58:30 +02:00
parent 74d5f92aba
commit f66badbfb1
2 changed files with 10 additions and 66 deletions

View File

@@ -1,4 +1,4 @@
import { Controller, Get, Param, Put } from '@nestjs/common';
import { Controller, Get, Param } from '@nestjs/common';
import { AuthService } from './auth.service.js';
@Controller('auth')
@@ -18,23 +18,9 @@ export class AuthController {
getUser(@Param('userid') userId: string): any {
return this.authService.getUser(userId);
}
@Get('groups')
getGroups(): any {
return this.authService.getGroups();
}
@Get('user/:userid/groups') //e0811669-c7eb-4e5e-a699-e8334d5c5b01 -> aknuth
getGroupsForUsers(@Param('userid') userId: string): any {
return this.authService.getGroupsForUser(userId);
}
@Get('user/:userid/lastlogin') //e0811669-c7eb-4e5e-a699-e8334d5c5b01 -> aknuth
getLastLogin(@Param('userid') userId: string): any {
return this.authService.getLastLogin(userId);
}
@Put('user/:userid/group/:groupid') //e0811669-c7eb-4e5e-a699-e8334d5c5b01 -> aknuth //
addUser2Group(@Param('userid') userId: string,@Param('groupid') groupId: string): any {
return this.authService.addUser2Group(userId,groupId);
}
}