1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-13 03:17:52 +02: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 10:06:44 -06: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 10:06:44 -06:00
@UseGuards(JwtAuthGuard)
2022-02-03 10:06:44 -06: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 10:06:44 -06:00
}