fix lint
This commit is contained in:
@ -46,7 +46,7 @@ export class DriveFileRepository extends Repository<DriveFile> {
|
||||
if (file.uri != null && file.userHost != null && config.mediaProxy != null) {
|
||||
return appendQuery(config.mediaProxy, query({
|
||||
url: file.uri,
|
||||
thumbnail: thumbnail ? '1' : undefined
|
||||
thumbnail: thumbnail ? '1' : undefined,
|
||||
}));
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ export class DriveFileRepository extends Repository<DriveFile> {
|
||||
): Promise<Packed<'DriveFile'> | null> {
|
||||
const opts = Object.assign({
|
||||
detail: false,
|
||||
self: false
|
||||
self: false,
|
||||
}, options);
|
||||
|
||||
const file = typeof src === 'object' ? src : await this.findOne(src);
|
||||
@ -141,10 +141,10 @@ export class DriveFileRepository extends Repository<DriveFile> {
|
||||
comment: file.comment,
|
||||
folderId: file.folderId,
|
||||
folder: opts.detail && file.folderId ? DriveFolders.pack(file.folderId, {
|
||||
detail: true
|
||||
detail: true,
|
||||
}) : null,
|
||||
userId: opts.withUser ? file.userId : null,
|
||||
user: (opts.withUser && file.userId) ? Users.pack(file.userId) : null
|
||||
user: (opts.withUser && file.userId) ? Users.pack(file.userId) : null,
|
||||
});
|
||||
}
|
||||
|
||||
@ -175,23 +175,23 @@ export const packedDriveFileSchema = {
|
||||
name: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
example: 'lenna.jpg'
|
||||
example: 'lenna.jpg',
|
||||
},
|
||||
type: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
example: 'image/jpeg'
|
||||
example: 'image/jpeg',
|
||||
},
|
||||
md5: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
format: 'md5',
|
||||
example: '15eca7fba0480996e2245f5185bf39f2'
|
||||
example: '15eca7fba0480996e2245f5185bf39f2',
|
||||
},
|
||||
size: {
|
||||
type: 'number' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
example: 51469
|
||||
example: 51469,
|
||||
},
|
||||
isSensitive: {
|
||||
type: 'boolean' as const,
|
||||
@ -199,7 +199,7 @@ export const packedDriveFileSchema = {
|
||||
},
|
||||
blurhash: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
optional: false as const, nullable: true as const,
|
||||
},
|
||||
properties: {
|
||||
type: 'object' as const,
|
||||
@ -208,24 +208,24 @@ export const packedDriveFileSchema = {
|
||||
width: {
|
||||
type: 'number' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
example: 1280
|
||||
example: 1280,
|
||||
},
|
||||
height: {
|
||||
type: 'number' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
example: 720
|
||||
example: 720,
|
||||
},
|
||||
orientation: {
|
||||
type: 'number' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
example: 8
|
||||
example: 8,
|
||||
},
|
||||
avgColor: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: false as const,
|
||||
example: 'rgb(40,65,87)'
|
||||
}
|
||||
}
|
||||
example: 'rgb(40,65,87)',
|
||||
},
|
||||
},
|
||||
},
|
||||
url: {
|
||||
type: 'string' as const,
|
||||
@ -239,7 +239,7 @@ export const packedDriveFileSchema = {
|
||||
},
|
||||
comment: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: true as const
|
||||
optional: false as const, nullable: true as const,
|
||||
},
|
||||
folderId: {
|
||||
type: 'string' as const,
|
||||
@ -262,6 +262,6 @@ export const packedDriveFileSchema = {
|
||||
type: 'object' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
ref: 'User' as const,
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user