diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-12-09 23:58:30 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-12-09 23:58:30 +0900 |
| commit | c69b72e1999578cba15e34677ebd366482cba734 (patch) | |
| tree | 624ac6500e36e3a7024a5ea19ae891ef86781d04 /packages/backend/src/server/api/endpoints/gallery | |
| parent | Update instance-mute.vue (diff) | |
| download | sharkey-c69b72e1999578cba15e34677ebd366482cba734.tar.gz sharkey-c69b72e1999578cba15e34677ebd366482cba734.tar.bz2 sharkey-c69b72e1999578cba15e34677ebd366482cba734.zip | |
fix lint
Diffstat (limited to 'packages/backend/src/server/api/endpoints/gallery')
9 files changed, 29 insertions, 29 deletions
diff --git a/packages/backend/src/server/api/endpoints/gallery/featured.ts b/packages/backend/src/server/api/endpoints/gallery/featured.ts index 30ef8cedec..dc86cf40ba 100644 --- a/packages/backend/src/server/api/endpoints/gallery/featured.ts +++ b/packages/backend/src/server/api/endpoints/gallery/featured.ts @@ -13,7 +13,7 @@ export const meta = { type: 'object' as const, optional: false as const, nullable: false as const, ref: 'GalleryPost', - } + }, }, }; diff --git a/packages/backend/src/server/api/endpoints/gallery/popular.ts b/packages/backend/src/server/api/endpoints/gallery/popular.ts index 18449b9654..ee3fe51ebf 100644 --- a/packages/backend/src/server/api/endpoints/gallery/popular.ts +++ b/packages/backend/src/server/api/endpoints/gallery/popular.ts @@ -13,7 +13,7 @@ export const meta = { type: 'object' as const, optional: false as const, nullable: false as const, ref: 'GalleryPost', - } + }, }, }; diff --git a/packages/backend/src/server/api/endpoints/gallery/posts.ts b/packages/backend/src/server/api/endpoints/gallery/posts.ts index 53d3236d2d..90bd2d959f 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts.ts @@ -10,7 +10,7 @@ export const meta = { params: { limit: { validator: $.optional.num.range(1, 100), - default: 10 + default: 10, }, sinceId: { @@ -29,7 +29,7 @@ export const meta = { type: 'object' as const, optional: false as const, nullable: false as const, ref: 'GalleryPost', - } + }, }, }; diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts index 34af72695d..dae6e27ddb 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts @@ -17,7 +17,7 @@ export const meta = { limit: { duration: ms('1hour'), - max: 300 + max: 300, }, params: { @@ -47,14 +47,14 @@ export const meta = { errors: { - } + }, }; export default define(meta, async (ps, user) => { const files = (await Promise.all(ps.fileIds.map(fileId => DriveFiles.findOne({ id: fileId, - userId: user.id + userId: user.id, }) ))).filter((file): file is DriveFile => file != null); @@ -70,7 +70,7 @@ export default define(meta, async (ps, user) => { description: ps.description, userId: user.id, isSensitive: ps.isSensitive, - fileIds: files.map(file => file.id) + fileIds: files.map(file => file.id), })).then(x => GalleryPosts.findOneOrFail(x.identifiers[0])); return await GalleryPosts.pack(post, user); diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts b/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts index e5b7c07f2f..e43c12a4c1 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts @@ -21,9 +21,9 @@ export const meta = { noSuchPost: { message: 'No such post.', code: 'NO_SUCH_POST', - id: 'ae52f367-4bd7-4ecd-afc6-5672fff427f5' + id: 'ae52f367-4bd7-4ecd-afc6-5672fff427f5', }, - } + }, }; export default define(meta, async (ps, user) => { diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/like.ts b/packages/backend/src/server/api/endpoints/gallery/posts/like.ts index 81a25c0ad1..d355d1e312 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/like.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/like.ts @@ -15,28 +15,28 @@ export const meta = { params: { postId: { validator: $.type(ID), - } + }, }, errors: { noSuchPost: { message: 'No such post.', code: 'NO_SUCH_POST', - id: '56c06af3-1287-442f-9701-c93f7c4a62ff' + id: '56c06af3-1287-442f-9701-c93f7c4a62ff', }, yourPost: { message: 'You cannot like your post.', code: 'YOUR_POST', - id: 'f78f1511-5ebc-4478-a888-1198d752da68' + id: 'f78f1511-5ebc-4478-a888-1198d752da68', }, alreadyLiked: { message: 'The post has already been liked.', code: 'ALREADY_LIKED', - id: '40e9ed56-a59c-473a-bf3f-f289c54fb5a7' + id: '40e9ed56-a59c-473a-bf3f-f289c54fb5a7', }, - } + }, }; export default define(meta, async (ps, user) => { @@ -52,7 +52,7 @@ export default define(meta, async (ps, user) => { // if already liked const exist = await GalleryLikes.findOne({ postId: post.id, - userId: user.id + userId: user.id, }); if (exist != null) { @@ -64,7 +64,7 @@ export default define(meta, async (ps, user) => { id: genId(), createdAt: new Date(), postId: post.id, - userId: user.id + userId: user.id, }); GalleryPosts.increment({ id: post.id }, 'likedCount', 1); diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/show.ts b/packages/backend/src/server/api/endpoints/gallery/posts/show.ts index 93852a5f8d..7e620b2c48 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/show.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/show.ts @@ -19,15 +19,15 @@ export const meta = { noSuchPost: { message: 'No such post.', code: 'NO_SUCH_POST', - id: '1137bf14-c5b0-4604-85bb-5b5371b1cd45' + id: '1137bf14-c5b0-4604-85bb-5b5371b1cd45', }, }, res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'GalleryPost' - } + ref: 'GalleryPost', + }, }; export default define(meta, async (ps, me) => { diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts b/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts index 0347cdf79e..323e7c4828 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts @@ -14,22 +14,22 @@ export const meta = { params: { postId: { validator: $.type(ID), - } + }, }, errors: { noSuchPost: { message: 'No such post.', code: 'NO_SUCH_POST', - id: 'c32e6dd0-b555-4413-925e-b3757d19ed84' + id: 'c32e6dd0-b555-4413-925e-b3757d19ed84', }, notLiked: { message: 'You have not liked that post.', code: 'NOT_LIKED', - id: 'e3e8e06e-be37-41f7-a5b4-87a8250288f0' + id: 'e3e8e06e-be37-41f7-a5b4-87a8250288f0', }, - } + }, }; export default define(meta, async (ps, user) => { @@ -40,7 +40,7 @@ export default define(meta, async (ps, user) => { const exist = await GalleryLikes.findOne({ postId: post.id, - userId: user.id + userId: user.id, }); if (exist == null) { diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts index f94606acf2..7cd694e804 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts @@ -16,7 +16,7 @@ export const meta = { limit: { duration: ms('1hour'), - max: 300 + max: 300, }, params: { @@ -50,14 +50,14 @@ export const meta = { errors: { - } + }, }; export default define(meta, async (ps, user) => { const files = (await Promise.all(ps.fileIds.map(fileId => DriveFiles.findOne({ id: fileId, - userId: user.id + userId: user.id, }) ))).filter((file): file is DriveFile => file != null); @@ -73,7 +73,7 @@ export default define(meta, async (ps, user) => { title: ps.title, description: ps.description, isSensitive: ps.isSensitive, - fileIds: files.map(file => file.id) + fileIds: files.map(file => file.id), }); const post = await GalleryPosts.findOneOrFail(ps.postId); |