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/ap | |
| parent | Update instance-mute.vue (diff) | |
| download | misskey-c69b72e1999578cba15e34677ebd366482cba734.tar.gz misskey-c69b72e1999578cba15e34677ebd366482cba734.tar.bz2 misskey-c69b72e1999578cba15e34677ebd366482cba734.zip | |
fix lint
Diffstat (limited to 'packages/backend/src/server/api/endpoints/ap')
| -rw-r--r-- | packages/backend/src/server/api/endpoints/ap/get.ts | 4 | ||||
| -rw-r--r-- | packages/backend/src/server/api/endpoints/ap/show.ts | 36 |
2 files changed, 20 insertions, 20 deletions
diff --git a/packages/backend/src/server/api/endpoints/ap/get.ts b/packages/backend/src/server/api/endpoints/ap/get.ts index 2f97a24774..000ed2d2df 100644 --- a/packages/backend/src/server/api/endpoints/ap/get.ts +++ b/packages/backend/src/server/api/endpoints/ap/get.ts @@ -11,7 +11,7 @@ export const meta = { limit: { duration: ms('1hour'), - max: 30 + max: 30, }, params: { @@ -26,7 +26,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - } + }, }; export default define(meta, async (ps) => { diff --git a/packages/backend/src/server/api/endpoints/ap/show.ts b/packages/backend/src/server/api/endpoints/ap/show.ts index 32685d44bd..709349262a 100644 --- a/packages/backend/src/server/api/endpoints/ap/show.ts +++ b/packages/backend/src/server/api/endpoints/ap/show.ts @@ -20,7 +20,7 @@ export const meta = { limit: { duration: ms('1hour'), - max: 30 + max: 30, }, params: { @@ -33,8 +33,8 @@ export const meta = { noSuchObject: { message: 'No such object.', code: 'NO_SUCH_OBJECT', - id: 'dc94d745-1262-4e63-a17d-fecaa57efc82' - } + id: 'dc94d745-1262-4e63-a17d-fecaa57efc82', + }, }, res: { @@ -44,14 +44,14 @@ export const meta = { type: { type: 'string' as const, optional: false as const, nullable: false as const, - enum: ['User', 'Note'] + enum: ['User', 'Note'], }, object: { type: 'object' as const, - optional: false as const, nullable: false as const - } - } - } + optional: false as const, nullable: false as const, + }, + }, + }, }; export default define(meta, async (ps) => { @@ -79,7 +79,7 @@ async function fetchAny(uri: string) { if (note) { return { type: 'Note', - object: await Notes.pack(note, null, { detail: true }) + object: await Notes.pack(note, null, { detail: true }), }; } } else if (type === 'users') { @@ -88,7 +88,7 @@ async function fetchAny(uri: string) { if (user) { return { type: 'User', - object: await Users.pack(user, null, { detail: true }) + object: await Users.pack(user, null, { detail: true }), }; } } @@ -102,7 +102,7 @@ async function fetchAny(uri: string) { { const [user, note] = await Promise.all([ Users.findOne({ uri: uri }), - Notes.findOne({ uri: uri }) + Notes.findOne({ uri: uri }), ]); const packed = await mergePack(user, note); @@ -127,7 +127,7 @@ async function fetchAny(uri: string) { if (note) { return { type: 'Note', - object: await Notes.pack(note, null, { detail: true }) + object: await Notes.pack(note, null, { detail: true }), }; } } else if (type === 'users') { @@ -136,7 +136,7 @@ async function fetchAny(uri: string) { if (user) { return { type: 'User', - object: await Users.pack(user, null, { detail: true }) + object: await Users.pack(user, null, { detail: true }), }; } } @@ -144,7 +144,7 @@ async function fetchAny(uri: string) { const [user, note] = await Promise.all([ Users.findOne({ uri: object.id }), - Notes.findOne({ uri: object.id }) + Notes.findOne({ uri: object.id }), ]); const packed = await mergePack(user, note); @@ -156,7 +156,7 @@ async function fetchAny(uri: string) { const user = await createPerson(getApId(object)); return { type: 'User', - object: await Users.pack(user, null, { detail: true }) + object: await Users.pack(user, null, { detail: true }), }; } @@ -164,7 +164,7 @@ async function fetchAny(uri: string) { const note = await createNote(getApId(object), undefined, true); return { type: 'Note', - object: await Notes.pack(note!, null, { detail: true }) + object: await Notes.pack(note!, null, { detail: true }), }; } @@ -175,14 +175,14 @@ async function mergePack(user: User | null | undefined, note: Note | null | unde if (user != null) { return { type: 'User', - object: await Users.pack(user, null, { detail: true }) + object: await Users.pack(user, null, { detail: true }), }; } if (note != null) { return { type: 'Note', - object: await Notes.pack(note, null, { detail: true }) + object: await Notes.pack(note, null, { detail: true }), }; } |