Auth Methoden überarbeitet
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user