Skip to content

Commit fdb6069

Browse files
committed
fix: add userId field to FileRecord and update related methods
1 parent 6284c89 commit fdb6069

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/server/utils/database.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ interface FileRecord {
1717
createdAt: string;
1818
modifiedAt: string;
1919
uploadedAt: string;
20+
userId?: string | null;
2021
tags?: string[];
2122
metadata?: any;
2223
}
@@ -118,6 +119,7 @@ export class Database {
118119
createdAt: row.createdAt,
119120
modifiedAt: row.modifiedAt,
120121
uploadedAt: row.uploadedAt,
122+
userId: row.userId ?? null,
121123
tags: this.parseJsonField<string[]>(row.tags),
122124
metadata: this.parseJsonField<any>(row.metadata)
123125
};
@@ -162,6 +164,7 @@ export class Database {
162164
createdAt: fileData.createdAt,
163165
modifiedAt: fileData.modifiedAt,
164166
uploadedAt: fileData.uploadedAt,
167+
userId: fileData.userId ?? null,
165168
tags: this.serializeTags(fileData.tags) || undefined,
166169
metadata: this.serializeMetadata(fileData.metadata) || undefined
167170
});

0 commit comments

Comments
 (0)