refactor: album service small tests (#25640)

This commit is contained in:
Daniel Dietzler
2026-02-06 14:56:46 +01:00
committed by GitHub
parent 16fe828913
commit a356497d96
4 changed files with 832 additions and 468 deletions

View File

@@ -17,8 +17,6 @@ set
where
"userId" = $2
and "albumId" = $3
returning
*
-- AlbumUserRepository.delete
delete from "album_user"

View File

@@ -25,14 +25,13 @@ export class AlbumUserRepository {
}
@GenerateSql({ params: [{ userId: DummyValue.UUID, albumId: DummyValue.UUID }, { role: AlbumUserRole.Viewer }] })
update({ userId, albumId }: AlbumPermissionId, dto: Updateable<AlbumUserTable>) {
return this.db
async update({ userId, albumId }: AlbumPermissionId, dto: Updateable<AlbumUserTable>) {
await this.db
.updateTable('album_user')
.set(dto)
.where('userId', '=', userId)
.where('albumId', '=', albumId)
.returningAll()
.executeTakeFirstOrThrow();
.execute();
}
@GenerateSql({ params: [{ userId: DummyValue.UUID, albumId: DummyValue.UUID }] })

File diff suppressed because it is too large Load Diff