aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Controllers
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-01-29 18:38:41 +0800
committercrupest <crupest@outlook.com>2020-01-29 18:38:41 +0800
commit81c261b59016e15d320ad963882afe4d9c7b5f7d (patch)
treedd1cd091ecc2c80943735af4b71b53ef26fc7eee /Timeline/Controllers
parent2750a3df1834c1c6623aa8c653504c7bc12cefd6 (diff)
downloadtimeline-81c261b59016e15d320ad963882afe4d9c7b5f7d.tar.gz
timeline-81c261b59016e15d320ad963882afe4d9c7b5f7d.tar.bz2
timeline-81c261b59016e15d320ad963882afe4d9c7b5f7d.zip
...
Diffstat (limited to 'Timeline/Controllers')
-rw-r--r--Timeline/Controllers/UserController.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Timeline/Controllers/UserController.cs b/Timeline/Controllers/UserController.cs
index 5f1b7bd7..3305952a 100644
--- a/Timeline/Controllers/UserController.cs
+++ b/Timeline/Controllers/UserController.cs
@@ -29,7 +29,7 @@ namespace Timeline.Controllers
[HttpGet("users"), AdminAuthorize]
public async Task<ActionResult<User[]>> List()
{
- return Ok(await _userService.ListUsers());
+ return Ok(await _userService.GetUsers());
}
[HttpGet("users/{username}"), AdminAuthorize]
@@ -105,7 +105,7 @@ namespace Timeline.Controllers
("Old Username", request.OldUsername), ("New Username", request.NewUsername)));
return BadRequest(ErrorResponse.UserCommon.NotExist());
}
- catch (UsernameConfictException e)
+ catch (ConfictException e)
{
_logger.LogInformation(e, Log.Format(LogChangeUsernameConflict,
("Old Username", request.OldUsername), ("New Username", request.NewUsername)));