From 1cbb3086fae4bdb7f4138d08f8ce9442c32ff697 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Tue, 26 Sep 2023 00:03:45 +0200 Subject: [PATCH] chore: format --- packages/megalodon/src/misskey.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/megalodon/src/misskey.ts b/packages/megalodon/src/misskey.ts index 5d87b51fb..92806efdd 100644 --- a/packages/megalodon/src/misskey.ts +++ b/packages/megalodon/src/misskey.ts @@ -1503,7 +1503,7 @@ export default class Misskey implements MegalodonInterface { // ====================================== public async getPoll(_id: string): Promise> { const res = await this.getStatus(_id); - if (res.data.poll == null) throw new Error("poll not found"); + if (res.data.poll == null) throw new Error('poll not found'); return { ...res, data: res.data.poll }; } @@ -1513,7 +1513,7 @@ export default class Misskey implements MegalodonInterface { public async votePoll(_id: string, choices: Array): Promise> { if (!_id) { return new Promise((_, reject) => { - const err = new ArgumentError("id is required"); + const err = new ArgumentError('id is required'); reject(err); }); } @@ -1523,11 +1523,11 @@ export default class Misskey implements MegalodonInterface { noteId: _id, choice: +c, }; - await this.client.post<{}>("/api/notes/polls/vote", params); + await this.client.post<{}>('/api/notes/polls/vote', params); } const res = await this.client - .post("/api/notes/show", { + .post('/api/notes/show', { noteId: _id, }) .then(async (res) => { @@ -1540,11 +1540,11 @@ export default class Misskey implements MegalodonInterface { if (!res.data) { return new Promise((_, reject) => { - const err = new UnexpectedError("poll does not exist"); + const err = new UnexpectedError('poll does not exist'); reject(err); }); } - + return { ...res, data: res.data }; }