mirror of
https://github.com/immich-app/immich.git
synced 2026-02-12 20:08:25 +03:00
refactor: album service small tests (#25640)
This commit is contained in:
@@ -17,8 +17,6 @@ set
|
||||
where
|
||||
"userId" = $2
|
||||
and "albumId" = $3
|
||||
returning
|
||||
*
|
||||
|
||||
-- AlbumUserRepository.delete
|
||||
delete from "album_user"
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user