init
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { STATUS } from '@consts';
|
||||
import { UserModel } from '@db/User';
|
||||
import { Context } from 'egg';
|
||||
|
||||
module.exports = () => {
|
||||
return async function tokenParser(ctx, next) {
|
||||
return async function tokenParser(ctx: Context, next: () => Promise<any>) {
|
||||
|
||||
if (!ctx.request.body || !ctx.request.body.token) {
|
||||
console.error('token not found');
|
||||
|
||||
Reference in New Issue
Block a user