2022-04-24 04:08:45 +02:00
|
|
|
import { Controller, Get, Post, Body, Patch, Param, Delete, UseGuards } from '@nestjs/common';
|
2022-02-03 17:06:44 +01:00
|
|
|
import { UserService } from './user.service';
|
2022-04-24 04:08:45 +02:00
|
|
|
import { JwtAuthGuard } from '../../modules/immich-jwt/guards/jwt-auth.guard';
|
|
|
|
import { AuthUserDto, GetAuthUser } from '../../decorators/auth-user.decorator';
|
2022-02-03 17:06:44 +01:00
|
|
|
|
2022-04-24 04:08:45 +02:00
|
|
|
@UseGuards(JwtAuthGuard)
|
2022-02-03 17:06:44 +01:00
|
|
|
@Controller('user')
|
|
|
|
export class UserController {
|
|
|
|
constructor(private readonly userService: UserService) {}
|
2022-04-24 04:08:45 +02:00
|
|
|
|
|
|
|
@Get()
|
|
|
|
async getAllUsers(@GetAuthUser() authUser: AuthUserDto) {
|
|
|
|
return await this.userService.getAllUsers(authUser);
|
|
|
|
}
|
2022-02-03 17:06:44 +01:00
|
|
|
}
|