Use visible NAS upload storage and reconcile missing files
This commit is contained in:
@@ -401,6 +401,7 @@ export class Accounts {
|
||||
)
|
||||
.get();
|
||||
if (!row) fail(404, 'ITEM_NOT_FOUND', '자료가 없거나 만료되었습니다.');
|
||||
if (row!.item.fileId) this.service.storage.availability.require(row!.item.fileId);
|
||||
return row!;
|
||||
}
|
||||
read(userId: string, id: string, value: boolean) {
|
||||
@@ -425,6 +426,7 @@ export class Accounts {
|
||||
query: { cursor?: string; limit: number; search?: string; kind?: string; read?: boolean },
|
||||
) {
|
||||
this.verified(userId);
|
||||
this.service.storage.availability.reconcile({ id: userId, kind: 'user' });
|
||||
let after: { createdAt: number; id: string } | undefined;
|
||||
if (query.cursor) {
|
||||
try {
|
||||
@@ -520,6 +522,7 @@ export class Accounts {
|
||||
};
|
||||
}
|
||||
vaultFiles(userId: string) {
|
||||
this.service.storage.availability.reconcile({ id: userId, kind: 'user' });
|
||||
const rows = this.service.db
|
||||
.select({ file: s.files })
|
||||
.from(s.access)
|
||||
|
||||
Reference in New Issue
Block a user