chore (backend): reflect entity changes to the schema and repository

This commit is contained in:
naskya 2024-04-21 10:59:02 +09:00
parent 96481f1353
commit d2dbfb37c7
No known key found for this signature in database
GPG Key ID: 712D413B3A9FED5C
2 changed files with 8 additions and 0 deletions

View File

@ -152,6 +152,7 @@ export const DriveFileRepository = db.getRepository(DriveFile).extend({
md5: file.md5,
size: file.size,
isSensitive: file.isSensitive,
usageHint: file.usageHint,
blurhash: file.blurhash,
properties: opts.self ? file.properties : this.getPublicProperties(file),
url: opts.self ? file.url : this.getPublicUrl(file, false),
@ -193,6 +194,7 @@ export const DriveFileRepository = db.getRepository(DriveFile).extend({
md5: file.md5,
size: file.size,
isSensitive: file.isSensitive,
usageHint: file.usageHint,
blurhash: file.blurhash,
properties: opts.self ? file.properties : this.getPublicProperties(file),
url: opts.self ? file.url : this.getPublicUrl(file, false),

View File

@ -44,6 +44,12 @@ export const packedDriveFileSchema = {
optional: false,
nullable: false,
},
usageHint: {
type: "string",
optional: false,
nullable: true,
enum: ["userAvatar", "userBanner"],
},
blurhash: {
type: "string",
optional: false,