This commit is contained in:
mertalev
2025-10-06 23:32:20 -04:00
parent de117ebe7a
commit e3e8da168f
15 changed files with 317 additions and 468 deletions
@@ -279,6 +279,7 @@ export class AssetRepository {
.execute();
}
@GenerateSql({ params: [DummyValue.UUID, DummyValue.UUID] })
getCompletionMetadata(assetId: string, ownerId: string) {
return this.db
.selectFrom('asset')
@@ -289,6 +290,7 @@ export class AssetRepository {
.executeTakeFirst();
}
@GenerateSql({ params: [DummyValue.UUID] })
async setComplete(assetId: string) {
await this.db
.updateTable('asset')
@@ -298,6 +300,7 @@ export class AssetRepository {
.execute();
}
@GenerateSql({ params: [DummyValue.UUID] })
async removeAndDecrementQuota(id: string): Promise<void> {
await this.db
.with('asset_exif', (qb) => qb.selectFrom('asset_exif').where('assetId', '=', id).select('fileSizeInByte'))
@@ -160,7 +160,7 @@ export class StorageRepository {
}
}
mkdir(filepath: string): Promise<String | undefined> {
mkdir(filepath: string): Promise<string | undefined> {
return fs.mkdir(filepath, { recursive: true });
}