adding filterUserId to comments api
This commit is contained in:
parent
4ad27a10ea
commit
ba4e744305
@ -496,6 +496,7 @@ namespace RMuseum.Controllers
|
||||
/// get recent comments
|
||||
/// </summary>
|
||||
/// <param name="paging"></param>
|
||||
/// <param name="filterUserId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[Route("comments")]
|
||||
@ -503,9 +504,9 @@ namespace RMuseum.Controllers
|
||||
[ProducesResponseType((int)HttpStatusCode.OK, Type = typeof(IEnumerable<GanjoorCommentFullViewModel>))]
|
||||
[ProducesResponseType((int)HttpStatusCode.BadRequest, Type = typeof(string))]
|
||||
|
||||
public async Task<IActionResult> GetRecentComments([FromQuery] PagingParameterModel paging)
|
||||
public async Task<IActionResult> GetRecentComments([FromQuery] PagingParameterModel paging, Guid? filterUserId = null)
|
||||
{
|
||||
var comments = await _ganjoorService.GetRecentComments(paging, Guid.Empty, true);
|
||||
var comments = await _ganjoorService.GetRecentComments(paging, filterUserId == null ? Guid.Empty : (Guid)filterUserId, true);
|
||||
if (!string.IsNullOrEmpty(comments.ExceptionString))
|
||||
{
|
||||
return BadRequest(comments.ExceptionString);
|
||||
|
||||
@ -765,11 +765,12 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Controllers.GanjoorController.GetRecentComments(RSecurityBackend.Models.Generic.PagingParameterModel)">
|
||||
<member name="M:RMuseum.Controllers.GanjoorController.GetRecentComments(RSecurityBackend.Models.Generic.PagingParameterModel,System.Nullable{System.Guid})">
|
||||
<summary>
|
||||
get recent comments
|
||||
</summary>
|
||||
<param name="paging"></param>
|
||||
<param name="filterUserId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Controllers.GanjoorController.GetMyRecentComments(RSecurityBackend.Models.Generic.PagingParameterModel)">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user