aboutsummaryrefslogtreecommitdiff
path: root/Backend/Api/Api/Controllers/UserController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Backend/Api/Api/Controllers/UserController.cs')
-rw-r--r--Backend/Api/Api/Controllers/UserController.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/Backend/Api/Api/Controllers/UserController.cs b/Backend/Api/Api/Controllers/UserController.cs
index dd081cb..6cc41ea 100644
--- a/Backend/Api/Api/Controllers/UserController.cs
+++ b/Backend/Api/Api/Controllers/UserController.cs
@@ -74,5 +74,29 @@ namespace Api.Controllers
return Ok(rez);
return BadRequest();
}
+
+ [HttpGet("{id}/followers")]
+ [Authorize(Roles = "User")]
+ public async Task<ActionResult<List<UserSend>>> GetFollowers(string id)
+ {
+ return Ok(await _userService.GetFollowers(id));
+ }
+
+ [HttpGet("{id}/following")]
+ [Authorize(Roles = "User")]
+ public async Task<ActionResult<List<UserSend>>> GetFollowing(string id)
+ {
+ return Ok(await _userService.GetFollowing(id));
+ }
+
+ [HttpGet("{id}/addFollower")]
+ [Authorize(Roles = "User")]
+ public async Task<ActionResult<List<UserSend>>> AddFollower(string userId, string followerId)
+ {
+ return Ok(await _userService.AddFollower(userId, followerId));
+ }
+
+
+
}
}