summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-10-16 06:37:21 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-10-16 06:37:21 +0900
commit80daf7c749298b72cd5722f81bcb8c9c543b3c52 (patch)
treec318f794d95e8e8d5696e7342471fd632f15d73a /src/server
parentfix(package): update @types/sharp to version 0.21.0 (#2908) (diff)
downloadmisskey-80daf7c749298b72cd5722f81bcb8c9c543b3c52.tar.gz
misskey-80daf7c749298b72cd5722f81bcb8c9c543b3c52.tar.bz2
misskey-80daf7c749298b72cd5722f81bcb8c9c543b3c52.zip
Implement API tests
Diffstat (limited to 'src/server')
-rw-r--r--src/server/api/index.ts2
-rw-r--r--src/server/index.ts3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/server/api/index.ts b/src/server/api/index.ts
index a8f6455d9a..c68f109ae1 100644
--- a/src/server/api/index.ts
+++ b/src/server/api/index.ts
@@ -54,4 +54,4 @@ router.all('*', async ctx => {
// Register router
app.use(router.routes());
-module.exports = app;
+export default app;
diff --git a/src/server/index.ts b/src/server/index.ts
index dc60b0d9ec..e9b2e2440a 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -18,6 +18,7 @@ import activityPub from './activitypub';
import webFinger from './webfinger';
import config from '../config';
import { updateNetworkStats } from '../services/update-chart';
+import apiServer from './api';
// Init app
const app = new Koa();
@@ -47,7 +48,7 @@ if (config.url.startsWith('https')) {
});
}
-app.use(mount('/api', require('./api')));
+app.use(mount('/api', apiServer));
app.use(mount('/files', require('./file')));
// Init router