You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-09 23:17:29 +02:00
Added sharing page to web (#355)
* Added shared album * Added list tile * Show info of shared album owner
This commit is contained in:
@@ -45,6 +45,11 @@ export class UserController {
|
||||
return await this.userService.getAllUsers(authUser, isAll);
|
||||
}
|
||||
|
||||
@Get('/:userId')
|
||||
async getUserById(@Param('userId') userId: string): Promise<UserResponseDto> {
|
||||
return await this.userService.getUserById(userId);
|
||||
}
|
||||
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@Get('me')
|
||||
|
@@ -38,6 +38,14 @@ export class UserService {
|
||||
return allUserExceptRequestedUser.map(mapUser);
|
||||
}
|
||||
|
||||
async getUserById(userId: string): Promise<UserResponseDto> {
|
||||
const user = await this.userRepository.get(userId);
|
||||
if (!user) {
|
||||
throw new NotFoundException('User not found');
|
||||
}
|
||||
|
||||
return mapUser(user);
|
||||
}
|
||||
async getUserInfo(authUser: AuthUserDto): Promise<UserResponseDto> {
|
||||
const user = await this.userRepository.get(authUser.id);
|
||||
if (!user) {
|
||||
@@ -94,7 +102,7 @@ export class UserService {
|
||||
}
|
||||
|
||||
try {
|
||||
await this.userRepository.createProfileImage(user, fileInfo)
|
||||
await this.userRepository.createProfileImage(user, fileInfo);
|
||||
|
||||
return mapCreateProfileImageResponse(authUser.id, fileInfo.path);
|
||||
} catch (e) {
|
||||
|
Reference in New Issue
Block a user