Ai Search finished, some makeup changes, guards, brokerSearch

This commit is contained in:
2024-08-28 15:41:59 +02:00
parent 8721be4a90
commit ede8b66d83
20 changed files with 139 additions and 53 deletions

View File

@@ -1,24 +1,30 @@
import { Controller, Get, Param } from '@nestjs/common';
import { Controller, Get, Param, UseGuards } from '@nestjs/common';
import { AdminAuthGuard } from '../jwt-auth/admin-auth.guard.js';
import { AuthService } from './auth.service.js';
@Controller('auth')
export class AuthController {
constructor(private readonly authService: AuthService) {}
@UseGuards(AdminAuthGuard)
@Get()
getAccessToken(): any {
return this.authService.getAccessToken();
}
@UseGuards(AdminAuthGuard)
@Get('users')
getUsers(): any {
return this.authService.getUsers();
}
@UseGuards(AdminAuthGuard)
@Get('user/:userid')
getUser(@Param('userid') userId: string): any {
return this.authService.getUser(userId);
}
@UseGuards(AdminAuthGuard)
@Get('user/:userid/lastlogin') //e0811669-c7eb-4e5e-a699-e8334d5c5b01 -> aknuth
getLastLogin(@Param('userid') userId: string): any {
return this.authService.getLastLogin(userId);