mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor(server): narrow auth types (#16066)
This commit is contained in:
parent
7c821dd205
commit
2d7c333c8c
25 changed files with 265 additions and 239 deletions
|
|
@ -44,7 +44,7 @@ export class UserController {
|
|||
|
||||
@Get('me')
|
||||
@Authenticated()
|
||||
getMyUser(@Auth() auth: AuthDto): UserAdminResponseDto {
|
||||
getMyUser(@Auth() auth: AuthDto): Promise<UserAdminResponseDto> {
|
||||
return this.service.getMe(auth);
|
||||
}
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ export class UserController {
|
|||
|
||||
@Get('me/preferences')
|
||||
@Authenticated()
|
||||
getMyPreferences(@Auth() auth: AuthDto): UserPreferencesResponseDto {
|
||||
getMyPreferences(@Auth() auth: AuthDto): Promise<UserPreferencesResponseDto> {
|
||||
return this.service.getMyPreferences(auth);
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ export class UserController {
|
|||
|
||||
@Get('me/license')
|
||||
@Authenticated()
|
||||
getUserLicense(@Auth() auth: AuthDto): LicenseResponseDto {
|
||||
getUserLicense(@Auth() auth: AuthDto): Promise<LicenseResponseDto> {
|
||||
return this.service.getLicense(auth);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue