mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore(web): quota enhancement (#6371)
* chore(web): quota enhancement * show quota in user table * update quota for single user ioption * Add a note how to set unlimited storage * fixed deletion doesn't update quota * refactor relation * fixed test * re-refactor * update sql * fix e2e test * Update server/src/domain/user/user.service.ts Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> * revert e2e test --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
parent
2a8cb70c98
commit
d096caccac
10 changed files with 183 additions and 128 deletions
|
|
@ -465,7 +465,15 @@ export class AssetService {
|
|||
async handleAssetDeletion(job: IAssetDeletionJob) {
|
||||
const { id, fromExternal } = job;
|
||||
|
||||
const asset = await this.assetRepository.getById(id);
|
||||
const asset = await this.assetRepository.getById(id, {
|
||||
faces: {
|
||||
person: true,
|
||||
},
|
||||
library: true,
|
||||
stack: true,
|
||||
exifInfo: true,
|
||||
});
|
||||
|
||||
if (!asset) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -554,7 +562,13 @@ export class AssetService {
|
|||
await this.access.requirePermission(auth, Permission.ASSET_UPDATE, newParentId);
|
||||
|
||||
const childIds: string[] = [];
|
||||
const oldParent = await this.assetRepository.getById(oldParentId);
|
||||
const oldParent = await this.assetRepository.getById(oldParentId, {
|
||||
faces: {
|
||||
person: true,
|
||||
},
|
||||
library: true,
|
||||
stack: true,
|
||||
});
|
||||
if (oldParent != null) {
|
||||
childIds.push(oldParent.id);
|
||||
// Get all children of old parent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue