aboutsummaryrefslogtreecommitdiff
path: root/API/Controllers/UserController.cs
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2020-12-11 21:25:45 +0200
committerSyndamia <kamen.d.mladenov@protonmail.com>2020-12-11 21:25:45 +0200
commit6ccb8618f2fe79e61702b0ba0ce48182d9293943 (patch)
tree1e9b1222ea7960f5e6c9c78e605ebb75c07858ad /API/Controllers/UserController.cs
parent62c14b8cb87135d2c2bbb86b6bbb480be6a91bbd (diff)
downloadDevHive-6ccb8618f2fe79e61702b0ba0ce48182d9293943.tar
DevHive-6ccb8618f2fe79e61702b0ba0ce48182d9293943.tar.gz
DevHive-6ccb8618f2fe79e61702b0ba0ce48182d9293943.zip
Made login require only username and made null roles to user
Diffstat (limited to 'API/Controllers/UserController.cs')
-rw-r--r--API/Controllers/UserController.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/API/Controllers/UserController.cs b/API/Controllers/UserController.cs
index 5b47f1c..922119e 100644
--- a/API/Controllers/UserController.cs
+++ b/API/Controllers/UserController.cs
@@ -29,7 +29,6 @@ namespace API.Controllers
return await this._service.LoginUser(userDTO);
}
-
//Create
[AllowAnonymous]
[HttpPost]
@@ -40,7 +39,7 @@ namespace API.Controllers
//Read
[HttpGet]
- [Authorize(Roles = "Admin")]
+ [Authorize(Roles = Data.Models.Classes.Roles.Admin)]
public async Task<IActionResult> GetById(int id)
{
return await this._service.GetUserById(id);