mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(server): user info endpoint (#9668)
* refactor(server): user info endpoint * chore: open api
This commit is contained in:
parent
202745f14b
commit
ecd018a826
6 changed files with 64 additions and 66 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue