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

@@ -843,6 +843,7 @@ export class Service {
}));
}
listItems(g: Guest, cursor?: string, limit = 30) {
this.storage.availability.reconcile(g);
let after: { createdAt: number; id: string } | undefined;
if (cursor) {
try {
@@ -933,6 +934,7 @@ export class Service {
)
.get();
if (!row) fail(404, 'ITEM_NOT_FOUND', '자료가 없거나 만료되었습니다.');
if (row!.item.fileId) this.storage.availability.require(row!.item.fileId);
return row!;
}
read(g: Guest, id: string, value: boolean) {
@@ -950,6 +952,7 @@ export class Service {
)
.get();
if (!row) fail(404, 'ITEM_NOT_FOUND', '자료가 없거나 만료되었습니다.');
if (row!.item.fileId) this.storage.availability.require(row!.item.fileId);
this.db
.update(s.access)
.set({ read: value })