refactor(server): user core (#4733)

This commit is contained in:
Jason Rasmussen
2023-10-31 11:01:32 -04:00
committed by GitHub
parent 2377df9dae
commit 088d5addf2
9 changed files with 160 additions and 304 deletions

View File

@@ -95,7 +95,7 @@ export class AlbumService {
async create(authUser: AuthUserDto, dto: CreateAlbumDto): Promise<AlbumResponseDto> {
for (const userId of dto.sharedWithUserIds || []) {
const exists = await this.userRepository.get(userId);
const exists = await this.userRepository.get(userId, {});
if (!exists) {
throw new BadRequestException('User not found');
}
@@ -238,7 +238,7 @@ export class AlbumService {
throw new BadRequestException('User already added');
}
const user = await this.userRepository.get(userId);
const user = await this.userRepository.get(userId, {});
if (!user) {
throw new BadRequestException('User not found');
}