token 验证
This commit is contained in:
parent
bc22c7cee6
commit
11a4b511c3
@ -31,16 +31,16 @@ namespace YD_WeChatApplet.Api.Filters
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var userModel = await _userContext.Users.FirstOrDefaultAsync(x => x.User_Id == userId);
|
//var userModel = await _userContext.Users.FirstOrDefaultAsync(x => x.User_Id == userId);
|
||||||
|
|
||||||
if (userModel == null)
|
//if (userModel == null)
|
||||||
{
|
//{
|
||||||
context.Result = new UnauthorizedObjectResult(new
|
// context.Result = new UnauthorizedObjectResult(new
|
||||||
{
|
// {
|
||||||
Code = 401,
|
// Code = 401,
|
||||||
Message = "未授权访问,请先登录"
|
// Message = "未授权访问,请先登录"
|
||||||
});
|
// });
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user