1
0
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:
Alex
2022-07-16 23:52:00 -05:00
committed by GitHub
parent 5d03e9bda8
commit c6ecfb679a
38 changed files with 403 additions and 63 deletions

View File

@@ -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')

View File

@@ -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) {