mirror of
https://github.com/immich-app/immich.git
synced 2025-12-17 17:23:20 +03:00
refactor(server): user info endpoint (#9668)
* refactor(server): user info endpoint * chore: open api
This commit is contained in:
@@ -41,10 +41,10 @@ export class UserController {
|
||||
return this.service.getAll(auth, isAll);
|
||||
}
|
||||
|
||||
@Get('info/:id')
|
||||
@Authenticated()
|
||||
getUserById(@Param() { id }: UUIDParamDto): Promise<UserResponseDto> {
|
||||
return this.service.get(id);
|
||||
@Post()
|
||||
@Authenticated({ admin: true })
|
||||
createUser(@Body() createUserDto: CreateUserDto): Promise<UserResponseDto> {
|
||||
return this.service.create(createUserDto);
|
||||
}
|
||||
|
||||
@Get('me')
|
||||
@@ -53,10 +53,10 @@ export class UserController {
|
||||
return this.service.getMe(auth);
|
||||
}
|
||||
|
||||
@Post()
|
||||
@Authenticated({ admin: true })
|
||||
createUser(@Body() createUserDto: CreateUserDto): Promise<UserResponseDto> {
|
||||
return this.service.create(createUserDto);
|
||||
@Get(':id')
|
||||
@Authenticated()
|
||||
getUserById(@Param() { id }: UUIDParamDto): Promise<UserResponseDto> {
|
||||
return this.service.get(id);
|
||||
}
|
||||
|
||||
@Delete('profile-image')
|
||||
|
||||
Reference in New Issue
Block a user