Use visible NAS upload storage and reconcile missing files
This commit is contained in:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user