summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/endpoints/admin/drive
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-12-09 23:58:30 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-12-09 23:58:30 +0900
commitc69b72e1999578cba15e34677ebd366482cba734 (patch)
tree624ac6500e36e3a7024a5ea19ae891ef86781d04 /packages/backend/src/server/api/endpoints/admin/drive
parentUpdate instance-mute.vue (diff)
downloadsharkey-c69b72e1999578cba15e34677ebd366482cba734.tar.gz
sharkey-c69b72e1999578cba15e34677ebd366482cba734.tar.bz2
sharkey-c69b72e1999578cba15e34677ebd366482cba734.zip
fix lint
Diffstat (limited to 'packages/backend/src/server/api/endpoints/admin/drive')
-rw-r--r--packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts2
-rw-r--r--packages/backend/src/server/api/endpoints/admin/drive/files.ts14
-rw-r--r--packages/backend/src/server/api/endpoints/admin/drive/show-file.ts50
3 files changed, 33 insertions, 33 deletions
diff --git a/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts b/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts
index 8497478da9..ae0e396b4f 100644
--- a/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts
+++ b/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts
@@ -12,7 +12,7 @@ export const meta = {
export default define(meta, async (ps, me) => {
const files = await DriveFiles.find({
- userId: IsNull()
+ userId: IsNull(),
});
for (const file of files) {
diff --git a/packages/backend/src/server/api/endpoints/admin/drive/files.ts b/packages/backend/src/server/api/endpoints/admin/drive/files.ts
index fe1c799805..ee07245db7 100644
--- a/packages/backend/src/server/api/endpoints/admin/drive/files.ts
+++ b/packages/backend/src/server/api/endpoints/admin/drive/files.ts
@@ -13,7 +13,7 @@ export const meta = {
params: {
limit: {
validator: $.optional.num.range(1, 100),
- default: 10
+ default: 10,
},
sinceId: {
@@ -25,7 +25,7 @@ export const meta = {
},
type: {
- validator: $.optional.nullable.str.match(/^[a-zA-Z0-9\/\-*]+$/)
+ validator: $.optional.nullable.str.match(/^[a-zA-Z0-9\/\-*]+$/),
},
origin: {
@@ -34,12 +34,12 @@ export const meta = {
'local',
'remote',
]),
- default: 'local'
+ default: 'local',
},
hostname: {
validator: $.optional.nullable.str,
- default: null
+ default: null,
},
},
@@ -49,9 +49,9 @@ export const meta = {
items: {
type: 'object' as const,
optional: false as const, nullable: false as const,
- ref: 'DriveFile'
- }
- }
+ ref: 'DriveFile',
+ },
+ },
};
export default define(meta, async (ps, me) => {
diff --git a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts
index 270b89c4fa..ab8e3d68e9 100644
--- a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts
+++ b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts
@@ -24,8 +24,8 @@ export const meta = {
noSuchFile: {
message: 'No such file.',
code: 'NO_SUCH_FILE',
- id: 'caf3ca38-c6e5-472e-a30c-b05377dcc240'
- }
+ id: 'caf3ca38-c6e5-472e-a30c-b05377dcc240',
+ },
},
res: {
@@ -51,36 +51,36 @@ export const meta = {
},
userHost: {
type: 'string' as const,
- optional: false as const, nullable: true as const
+ optional: false as const, nullable: true as const,
},
md5: {
type: 'string' as const,
optional: false as const, nullable: false as const,
format: 'md5',
- example: '15eca7fba0480996e2245f5185bf39f2'
+ example: '15eca7fba0480996e2245f5185bf39f2',
},
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',
},
size: {
type: 'number' as const,
optional: false as const, nullable: false as const,
- example: 51469
+ example: 51469,
},
comment: {
type: 'string' as const,
- optional: false as const, nullable: true as const
+ optional: false as const, nullable: true as const,
},
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,
@@ -89,24 +89,24 @@ export const meta = {
width: {
type: 'number' as const,
optional: false as const, nullable: false as const,
- example: 1280
+ example: 1280,
},
height: {
type: 'number' as const,
optional: false as const, nullable: false as const,
- example: 720
+ example: 720,
},
avgColor: {
type: 'string' as const,
optional: true as const, nullable: false as const,
- example: 'rgb(40,65,87)'
- }
- }
+ example: 'rgb(40,65,87)',
+ },
+ },
},
storedInternal: {
type: 'boolean' as const,
optional: false as const, nullable: true as const,
- example: true
+ example: true,
},
url: {
type: 'string' as const,
@@ -137,11 +137,11 @@ export const meta = {
},
uri: {
type: 'string' as const,
- optional: false as const, nullable: true as const
+ optional: false as const, nullable: true as const,
},
src: {
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,
@@ -155,21 +155,21 @@ export const meta = {
},
isLink: {
type: 'boolean' as const,
- optional: false as const, nullable: false as const
- }
- }
- }
+ optional: false as const, nullable: false as const,
+ },
+ },
+ },
};
export default define(meta, async (ps, me) => {
const file = ps.fileId ? await DriveFiles.findOne(ps.fileId) : await DriveFiles.findOne({
where: [{
- url: ps.url
+ url: ps.url,
}, {
- thumbnailUrl: ps.url
+ thumbnailUrl: ps.url,
}, {
- webpublicUrl: ps.url
- }]
+ webpublicUrl: ps.url,
+ }],
});
if (file == null) {