big fixed
This commit is contained in:
parent
8d221222a9
commit
4e922091e6
@ -76,15 +76,15 @@ AuthToken.prototype.checkTokenKoaRequest = async function (ctx, next) {
|
||||
|
||||
if (!token) {
|
||||
ctx.body = {
|
||||
result: 'fail', error: { code: 401, msg: 'Need user token.' }, data: {}
|
||||
code: 401, msg: 'Need user token.', data: {}
|
||||
};
|
||||
return;
|
||||
}
|
||||
|
||||
let tokenData = await this.checkToken(token, "");
|
||||
if (!ret) {
|
||||
if (!tokenData) {
|
||||
ctx.body = {
|
||||
result: 'fail', error: { code: 401, msg: 'User token error.' }, data: {}
|
||||
code: 401, msg: 'Need user token.', data: {}
|
||||
};
|
||||
return;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ehason/auth",
|
||||
"version": "1.3.1",
|
||||
"version": "1.3.3",
|
||||
"description": "User auth lib",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
Loading…
Reference in New Issue
Block a user