diff options
author | crupest <crupest@outlook.com> | 2020-01-21 01:11:17 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-01-21 01:11:17 +0800 |
commit | 747bf829351c30069647a44f98ac19f1a214370f (patch) | |
tree | a45506852659b9d8e2bfe0b9e58a496060f7cd9b /Timeline/Controllers/UserController.cs | |
parent | 40eea04e1ec9b71c5215e9dce5a6963ea60cafaa (diff) | |
download | timeline-747bf829351c30069647a44f98ac19f1a214370f.tar.gz timeline-747bf829351c30069647a44f98ac19f1a214370f.tar.bz2 timeline-747bf829351c30069647a44f98ac19f1a214370f.zip |
...
Diffstat (limited to 'Timeline/Controllers/UserController.cs')
-rw-r--r-- | Timeline/Controllers/UserController.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Timeline/Controllers/UserController.cs b/Timeline/Controllers/UserController.cs index 956865dc..65ee3a0f 100644 --- a/Timeline/Controllers/UserController.cs +++ b/Timeline/Controllers/UserController.cs @@ -27,15 +27,15 @@ namespace Timeline.Controllers }
[HttpGet("users"), AdminAuthorize]
- public async Task<ActionResult<UserInfo[]>> List()
+ public async Task<ActionResult<User[]>> List()
{
return Ok(await _userService.ListUsers());
}
[HttpGet("users/{username}"), AdminAuthorize]
- public async Task<ActionResult<UserInfo>> Get([FromRoute][Username] string username)
+ public async Task<ActionResult<User>> Get([FromRoute][Username] string username)
{
- var user = await _userService.GetUser(username);
+ var user = await _userService.GetUserByUsername(username);
if (user == null)
{
_logger.LogInformation(Log.Format(LogGetUserNotExist, ("Username", username)));
|