refactor(server): access checks (#2776)
* refactor(server): access checks * chore: simply asset module
This commit is contained in:
@@ -124,8 +124,8 @@ export class AlbumRepository implements IAlbumRepository {
|
||||
});
|
||||
}
|
||||
|
||||
async hasAsset(id: string, assetId: string): Promise<boolean> {
|
||||
const count = await this.repository.count({
|
||||
hasAsset(id: string, assetId: string): Promise<boolean> {
|
||||
return this.repository.exist({
|
||||
where: {
|
||||
id,
|
||||
assets: {
|
||||
@@ -136,8 +136,6 @@ export class AlbumRepository implements IAlbumRepository {
|
||||
assets: true,
|
||||
},
|
||||
});
|
||||
|
||||
return Boolean(count);
|
||||
}
|
||||
|
||||
async create(album: Partial<AlbumEntity>): Promise<AlbumEntity> {
|
||||
|
||||
Reference in New Issue
Block a user