You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-09 23:17:29 +02:00
Update get user info controller to avoid conflict with /count
This commit is contained in:
@@ -45,7 +45,7 @@ export class UserController {
|
||||
return await this.userService.getAllUsers(authUser, isAll);
|
||||
}
|
||||
|
||||
@Get('/:userId')
|
||||
@Get('/info/:userId')
|
||||
async getUserById(@Param('userId') userId: string): Promise<UserResponseDto> {
|
||||
return await this.userService.getUserById(userId);
|
||||
}
|
||||
|
@@ -39,6 +39,7 @@ export class UserService {
|
||||
}
|
||||
|
||||
async getUserById(userId: string): Promise<UserResponseDto> {
|
||||
console.log(userId);
|
||||
const user = await this.userRepository.get(userId);
|
||||
if (!user) {
|
||||
throw new NotFoundException('User not found');
|
||||
@@ -46,6 +47,7 @@ export class UserService {
|
||||
|
||||
return mapUser(user);
|
||||
}
|
||||
|
||||
async getUserInfo(authUser: AuthUserDto): Promise<UserResponseDto> {
|
||||
const user = await this.userRepository.get(authUser.id);
|
||||
if (!user) {
|
||||
|
Reference in New Issue
Block a user