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