chore(server): change save -> update in asset repository (#8055)

* `save` -> `update`

* change return type

* include relations

* fix tests

* remove when mocks

* fix

* stricter typing

* simpler type
This commit is contained in:
Mert
2024-03-19 22:42:10 -04:00
committed by GitHub
parent 9e4bab7494
commit 2daed747cd
14 changed files with 128 additions and 138 deletions
+5 -5
View File
@@ -93,27 +93,27 @@ export class AuditService {
switch (pathType) {
case AssetPathType.ENCODED_VIDEO: {
await this.assetRepository.save({ id, encodedVideoPath: pathValue });
await this.assetRepository.update({ id, encodedVideoPath: pathValue });
break;
}
case AssetPathType.JPEG_THUMBNAIL: {
await this.assetRepository.save({ id, resizePath: pathValue });
await this.assetRepository.update({ id, resizePath: pathValue });
break;
}
case AssetPathType.WEBP_THUMBNAIL: {
await this.assetRepository.save({ id, webpPath: pathValue });
await this.assetRepository.update({ id, webpPath: pathValue });
break;
}
case AssetPathType.ORIGINAL: {
await this.assetRepository.save({ id, originalPath: pathValue });
await this.assetRepository.update({ id, originalPath: pathValue });
break;
}
case AssetPathType.SIDECAR: {
await this.assetRepository.save({ id, sidecarPath: pathValue });
await this.assetRepository.update({ id, sidecarPath: pathValue });
break;
}