Website Summary Files Commits Branches @commit @diff @stats
path: root / src / DevHive.Web / Controllers
diff options
context:
space:
mode:
Commit4836e2f4cc3e1eb53f415d26771c76c84d29c280 (patch)
Author
 transtrike <transtrike@gmail.com>
2021-01-19 13:13:03 +0200
Committer
 transtrike <transtrike@gmail.com>
2021-01-19 13:13:03 +0200
Files2a9cccffc647882d16e259445ed0be236fdffd79 /src/DevHive.Web/Controllers
DevHive-4836e2f4cc3e1eb53f415d26771c76c84d29c280.tar
DevHive-4836e2f4cc3e1eb53f415d26771c76c84d29c280.tar.gz
DevHive-4836e2f4cc3e1eb53f415d26771c76c84d29c280.zip
Parentb81cdf3b60914e821de6a3ad35dc2af6637bca0c (diff)
Configured launch.json to be workspace wide; Fixed GetFriend to GetUser
2 files changed, 4 insertions, 4 deletions
-rw-r--r--src/DevHive.Web/Controllers/RoleController.cs2
-rw-r--r--src/DevHive.Web/Controllers/UserController.cs6
diff --git a/src/DevHive.Web/Controllers/RoleController.cs b/src/DevHive.Web/Controllers/RoleController.cs
index 5b3dca5..f173ea4 100644
--- a/src/DevHive.Web/Controllers/RoleController.cs
+++ b/src/DevHive.Web/Controllers/RoleController.cs
@@ -8,7 +8,7 @@ using DevHive.Services.Models.Identity.Role;
namespace DevHive.Web.Controllers
{
- [ApiController]
+ [ApiController]
[Route("/api/[controller]")]
//[Authorize(Roles = "Admin")]
public class RoleController
diff --git a/src/DevHive.Web/Controllers/UserController.cs b/src/DevHive.Web/Controllers/UserController.cs
index a306007..dc27cbf 100644
--- a/src/DevHive.Web/Controllers/UserController.cs
+++ b/src/DevHive.Web/Controllers/UserController.cs
@@ -72,11 +72,11 @@ namespace DevHive.Web.Controllers
}
[HttpGet]
- [Route("GetFriend")]
+ [Route("GetUser")]
[AllowAnonymous]
- public async Task<IActionResult> GetAFriend(string username)
+ public async Task<IActionResult> GetUser(string username)
{
- UserServiceModel friendServiceModel = await this._userService.GetFriend(username);
+ UserServiceModel friendServiceModel = await this._userService.GetUserByUsername(username);
UserWebModel friend = this._userMapper.Map<UserWebModel>(friendServiceModel);
return new OkObjectResult(friend);