From b892622e7ffdf4220f6631ec58f7a6692881dd35 Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 31 Jan 2020 21:57:09 +0800 Subject: Fix test bugs in user info mapper. Make create user action return created user info. --- Timeline/Controllers/UserController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Timeline/Controllers/UserController.cs') diff --git a/Timeline/Controllers/UserController.cs b/Timeline/Controllers/UserController.cs index 4572296b..26e63f63 100644 --- a/Timeline/Controllers/UserController.cs +++ b/Timeline/Controllers/UserController.cs @@ -108,12 +108,12 @@ namespace Timeline.Controllers } [HttpPost("userop/createuser"), AdminAuthorize] - public async Task CreateUser([FromBody] CreateUserRequest body) + public async Task> CreateUser([FromBody] CreateUserRequest body) { try { - await _userService.CreateUser(_mapper.Map(body)); - return Ok(); + var user = await _userService.CreateUser(_mapper.Map(body)); + return Ok(ConvertToUserInfo(user)); } catch (ConflictException) { -- cgit v1.2.3