aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Controllers/UserController.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-04-15 22:25:46 +0800
committerGitHub <noreply@github.com>2019-04-15 22:25:46 +0800
commitae848e311b46a25ec1ed571432d55e800ac7595b (patch)
tree510628773fefe110de4d80eb268d5c5c3e17d998 /Timeline/Controllers/UserController.cs
parent825778f4058d107186be66af05b1f8d16cd1e32c (diff)
parent500b71e094f2ed827f2e85fb6a83a8fb0eaf5d83 (diff)
downloadtimeline-ae848e311b46a25ec1ed571432d55e800ac7595b.tar.gz
timeline-ae848e311b46a25ec1ed571432d55e800ac7595b.tar.bz2
timeline-ae848e311b46a25ec1ed571432d55e800ac7595b.zip
Merge pull request #21 from crupest/verifytoken
Rename ValidateToken to VerifyToken.
Diffstat (limited to 'Timeline/Controllers/UserController.cs')
-rw-r--r--Timeline/Controllers/UserController.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Timeline/Controllers/UserController.cs b/Timeline/Controllers/UserController.cs
index 3b4e7b4f..147724c1 100644
--- a/Timeline/Controllers/UserController.cs
+++ b/Timeline/Controllers/UserController.cs
@@ -53,19 +53,19 @@ namespace Timeline.Controllers
[HttpPost("[action]")]
[AllowAnonymous]
- public async Task<ActionResult<TokenValidationResponse>> ValidateToken([FromBody] TokenValidationRequest request)
+ public async Task<ActionResult<VerifyTokenResponse>> VerifyToken([FromBody] VerifyTokenRequest request)
{
var result = await _userService.VerifyToken(request.Token);
if (result == null)
{
- return Ok(new TokenValidationResponse
+ return Ok(new VerifyTokenResponse
{
IsValid = false,
});
}
- return Ok(new TokenValidationResponse
+ return Ok(new VerifyTokenResponse
{
IsValid = true,
UserInfo = result