Update dependencies 🚀

This commit is contained in:
syuilo
2019-09-27 05:50:34 +09:00
parent f4cb62db16
commit 42a14508f6
19 changed files with 1002 additions and 1001 deletions

View File

@@ -6,7 +6,7 @@ import call from './call';
import { ApiError } from './error';
export default (endpoint: IEndpoint, ctx: Koa.BaseContext) => new Promise((res) => {
const body = ctx.is('multipart/form-data') ? (ctx.req as any).body : ctx.request.body;
const body = ctx.request.body;
const reply = (x?: any, y?: ApiError) => {
if (x == null) {
@@ -31,7 +31,7 @@ export default (endpoint: IEndpoint, ctx: Koa.BaseContext) => new Promise((res)
// Authentication
authenticate(body['i']).then(([user, app]) => {
// API invoking
call(endpoint.name, user, app, body, (ctx.req as any).file).then((res: any) => {
call(endpoint.name, user, app, body, (ctx as any).file).then((res: any) => {
reply(res);
}).catch((e: ApiError) => {
reply(e.httpStatusCode ? e.httpStatusCode : e.kind == 'client' ? 400 : 500, e);

View File

@@ -3,8 +3,8 @@
*/
import * as Koa from 'koa';
import * as Router from 'koa-router';
import * as multer from 'koa-multer';
import * as Router from '@koa/router';
import * as multer from '@koa/multer';
import * as bodyParser from 'koa-bodyparser';
import * as cors from '@koa/cors';

View File

@@ -1,5 +1,5 @@
import * as Koa from 'koa';
import * as Router from 'koa-router';
import * as Router from '@koa/router';
import * as request from 'request';
import { OAuth2 } from 'oauth';
import config from '../../../config';

View File

@@ -1,5 +1,5 @@
import * as Koa from 'koa';
import * as Router from 'koa-router';
import * as Router from '@koa/router';
import * as request from 'request';
import { OAuth2 } from 'oauth';
import config from '../../../config';

View File

@@ -1,5 +1,5 @@
import * as Koa from 'koa';
import * as Router from 'koa-router';
import * as Router from '@koa/router';
import { v4 as uuid } from 'uuid';
import autwh from 'autwh';
import redis from '../../../db/redis';