1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-09 05:16:47 +01:00
immich/server/src/api-v1/user/user.controller.ts

16 lines
570 B
TypeScript
Raw Normal View History

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';
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
@UseGuards(JwtAuthGuard)
2022-02-03 17:06:44 +01:00
@Controller('user')
export class UserController {
constructor(private readonly userService: UserService) {}
@Get()
async getAllUsers(@GetAuthUser() authUser: AuthUserDto) {
return await this.userService.getAllUsers(authUser);
}
2022-02-03 17:06:44 +01:00
}