summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/index.ts
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/index.ts
parentUpdate instance-mute.vue (diff)
downloadmisskey-c69b72e1999578cba15e34677ebd366482cba734.tar.gz
misskey-c69b72e1999578cba15e34677ebd366482cba734.tar.bz2
misskey-c69b72e1999578cba15e34677ebd366482cba734.zip
fix lint
Diffstat (limited to 'packages/backend/src/server/api/index.ts')
-rw-r--r--packages/backend/src/server/api/index.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/backend/src/server/api/index.ts b/packages/backend/src/server/api/index.ts
index 82579075eb..8f8a9d999e 100644
--- a/packages/backend/src/server/api/index.ts
+++ b/packages/backend/src/server/api/index.ts
@@ -23,7 +23,7 @@ import config from '@/config';
const app = new Koa();
app.use(cors({
- origin: '*'
+ origin: '*',
}));
// No caching
@@ -34,7 +34,7 @@ app.use(async (ctx, next) => {
app.use(bodyParser({
// リクエストが multipart/form-data でない限りはJSONだと見なす
- detectJSON: ctx => !ctx.is('multipart/form-data')
+ detectJSON: ctx => !ctx.is('multipart/form-data'),
}));
// Init multer instance
@@ -43,7 +43,7 @@ const upload = multer({
limits: {
fileSize: config.maxFileSize || 262144000,
files: 1,
- }
+ },
});
// Init router
@@ -74,7 +74,7 @@ router.use(twitter.routes());
router.get('/v1/instance/peers', async ctx => {
const instances = await Instances.find({
- select: ['host']
+ select: ['host'],
});
ctx.body = instances.map(instance => instance.host);
@@ -82,18 +82,18 @@ router.get('/v1/instance/peers', async ctx => {
router.post('/miauth/:session/check', async ctx => {
const token = await AccessTokens.findOne({
- session: ctx.params.session
+ session: ctx.params.session,
});
if (token && token.session != null && !token.fetched) {
AccessTokens.update(token.id, {
- fetched: true
+ fetched: true,
});
ctx.body = {
ok: true,
token: token.token,
- user: await Users.pack(token.userId, null, { detail: true })
+ user: await Users.pack(token.userId, null, { detail: true }),
};
} else {
ctx.body = {