aboutsummaryrefslogtreecommitdiff
path: root/src/Web/DevHive.Web/Controllers/FeedController.cs
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-03-15 09:27:12 +0200
committertranstrike <transtrike@gmail.com>2021-03-15 09:27:12 +0200
commit0161be09312fde634865f110504884119a617d5c (patch)
tree0fa68366edcb024c054f370ecf90f5b66282aae5 /src/Web/DevHive.Web/Controllers/FeedController.cs
parente3b5757b5a5db2f7874b0924cdd4a22b1a9e1ee2 (diff)
parentac82c773a5ec43c6a59d3d0b7665b67ac9e6bdde (diff)
downloadDevHive-0161be09312fde634865f110504884119a617d5c.tar
DevHive-0161be09312fde634865f110504884119a617d5c.tar.gz
DevHive-0161be09312fde634865f110504884119a617d5c.zip
Fixed to new() where possible and readable
Diffstat (limited to 'src/Web/DevHive.Web/Controllers/FeedController.cs')
-rw-r--r--src/Web/DevHive.Web/Controllers/FeedController.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Web/DevHive.Web/Controllers/FeedController.cs b/src/Web/DevHive.Web/Controllers/FeedController.cs
index abca3e4..37532a9 100644
--- a/src/Web/DevHive.Web/Controllers/FeedController.cs
+++ b/src/Web/DevHive.Web/Controllers/FeedController.cs
@@ -10,6 +10,9 @@ using Microsoft.AspNetCore.Mvc;
namespace DevHive.Web.Controllers
{
+ /// <summary>
+ /// All endpoints for interacting with the feed layer
+ /// </summary>
[ApiController]
[Route("/api/[controller]")]
[Authorize(Roles = "User,Admin")]
@@ -24,6 +27,12 @@ namespace DevHive.Web.Controllers
this._mapper = mapper;
}
+ /// <summary>
+ /// Query posts for user's feed
+ /// </summary>
+ /// <param name="userId">The user's Id, whose feed is begin queried</param>
+ /// <param name="getPageWebModel">Page parametars</param>
+ /// <returns>A page of the feed</returns>
[HttpPost]
[Route("GetPosts")]
public async Task<IActionResult> GetPosts(Guid userId, [FromBody] GetPageWebModel getPageWebModel)
@@ -37,6 +46,12 @@ namespace DevHive.Web.Controllers
return new OkObjectResult(readPageWebModel);
}
+ /// <summary>
+ /// Query a user profile's posts
+ /// </summary>
+ /// <param name="username">The user's username, whose posts are being queried</param>
+ /// <param name="getPageWebModel">Page parametars</param>
+ /// <returns>A page of the user's posts</returns>
[HttpPost]
[Route("GetUserPosts")]
[AllowAnonymous]