diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2021-03-13 22:15:20 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-13 22:15:20 +0900 |
| commit | 9e634360fa1d95f7d5c1aa8654c8f64e459ae07d (patch) | |
| tree | 25adfc0ece5657da11e2c00570991234d4131c23 /src | |
| parent | test: Add apple-touch-icon.png test (diff) | |
| download | sharkey-9e634360fa1d95f7d5c1aa8654c8f64e459ae07d.tar.gz sharkey-9e634360fa1d95f7d5c1aa8654c8f64e459ae07d.tar.bz2 sharkey-9e634360fa1d95f7d5c1aa8654c8f64e459ae07d.zip | |
Fix Schema (#7347)
Diffstat (limited to 'src')
| -rw-r--r-- | src/models/entities/drive-file.ts | 2 | ||||
| -rw-r--r-- | src/models/repositories/antenna.ts | 18 | ||||
| -rw-r--r-- | src/models/repositories/drive-file.ts | 4 |
3 files changed, 16 insertions, 8 deletions
diff --git a/src/models/entities/drive-file.ts b/src/models/entities/drive-file.ts index 680a40bc06..698dfac222 100644 --- a/src/models/entities/drive-file.ts +++ b/src/models/entities/drive-file.ts @@ -77,7 +77,7 @@ export class DriveFile { default: {}, comment: 'The any properties of the DriveFile. For example, it includes image width/height.' }) - public properties: Record<string, any>; + public properties: { width?: number; height?: number; avgColor?: string }; @Index() @Column('boolean') diff --git a/src/models/repositories/antenna.ts b/src/models/repositories/antenna.ts index 0f0a5c0171..84e082bd25 100644 --- a/src/models/repositories/antenna.ts +++ b/src/models/repositories/antenna.ts @@ -56,16 +56,24 @@ export const packedAntennaSchema = { type: 'array' as const, optional: false as const, nullable: false as const, items: { - type: 'string' as const, - optional: false as const, nullable: false as const + type: 'array' as const, + optional: false as const, nullable: false as const, + items: { + type: 'string' as const, + optional: false as const, nullable: false as const + } } }, - execludeKeywords: { + excludeKeywords: { type: 'array' as const, optional: false as const, nullable: false as const, items: { - type: 'string' as const, - optional: false as const, nullable: false as const + type: 'array' as const, + optional: false as const, nullable: false as const, + items: { + type: 'string' as const, + optional: false as const, nullable: false as const + } } }, src: { diff --git a/src/models/repositories/drive-file.ts b/src/models/repositories/drive-file.ts index 5085c76e92..bc1e37489c 100644 --- a/src/models/repositories/drive-file.ts +++ b/src/models/repositories/drive-file.ts @@ -197,12 +197,12 @@ export const packedDriveFileSchema = { properties: { width: { type: 'number' as const, - optional: false as const, nullable: false as const, + optional: true as const, nullable: false as const, example: 1280 }, height: { type: 'number' as const, - optional: false as const, nullable: false as const, + optional: true as const, nullable: false as const, example: 720 }, avgColor: { |