Use visible NAS upload storage and reconcile missing files

This commit is contained in:
2026-10-13 15:54:27 +09:00
parent 50e54bc4c5
commit 9e0f493228
26 changed files with 1075 additions and 119 deletions

View File

@@ -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)