aboutsummaryrefslogtreecommitdiff
path: root/API/Controllers/UserController.cs
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2020-12-11 15:23:15 +0200
committerSyndamia <kamen.d.mladenov@protonmail.com>2020-12-11 15:23:15 +0200
commit5a64d52df66264c9f752b03f38a0bc40ddf25931 (patch)
tree6fbd918dcdf0c67e438e7354691ee1e81e8c34bb /API/Controllers/UserController.cs
parent8554d02a954449e8e7c250f3f83868834056afad (diff)
downloadDevHive-5a64d52df66264c9f752b03f38a0bc40ddf25931.tar
DevHive-5a64d52df66264c9f752b03f38a0bc40ddf25931.tar.gz
DevHive-5a64d52df66264c9f752b03f38a0bc40ddf25931.zip
Made UserController (and UserService) return IActionResult, rather than HttpStatusCode
Diffstat (limited to 'API/Controllers/UserController.cs')
-rw-r--r--API/Controllers/UserController.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/API/Controllers/UserController.cs b/API/Controllers/UserController.cs
index 3f18dbe..7e75e3e 100644
--- a/API/Controllers/UserController.cs
+++ b/API/Controllers/UserController.cs
@@ -23,28 +23,28 @@ namespace API.Controllers
//Create
[HttpPost]
- public async Task<HttpStatusCode> Create([FromBody] UserDTO userDTO)
+ public async Task<IActionResult> Create([FromBody] UserDTO userDTO)
{
return await this._service.CreateUser(userDTO);
}
//Read
[HttpGet]
- public async Task<User> GetById(int id)
+ public async Task<IActionResult> GetById(int id)
{
return await this._service.GetUserById(id);
}
//Update
[HttpPut]
- public async Task<HttpStatusCode> Update(int id, [FromBody] UserDTO userDTO)
+ public async Task<IActionResult> Update(int id, [FromBody] UserDTO userDTO)
{
return await this._service.UpdateUser(id, userDTO);
}
//Delete
[HttpDelete]
- public async Task<HttpStatusCode> Delete(int id)
+ public async Task<IActionResult> Delete(int id)
{
return await this._service.DeleteUser(id);
}