docs: #275 api/poetspecs/unpublished/next GET API
This commit is contained in:
parent
02b678bfb4
commit
5a543b4340
@ -1,5 +1,6 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using RMuseum.Models.Auth.Memory;
|
||||
using RMuseum.Models.Ganjoor.ViewModels;
|
||||
using RMuseum.Services;
|
||||
using System.Net;
|
||||
@ -28,6 +29,27 @@ namespace RMuseum.Controllers
|
||||
return Ok(res.Result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// return the next unpublished suggested line for poets
|
||||
/// </summary>
|
||||
/// <param name="skip"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpGet("unpublished/next")]
|
||||
[Authorize(Policy = RMuseumSecurableItem.GanjoorEntityShortName + ":" + RMuseumSecurableItem.ModeratePoetPhotos)]
|
||||
[ProducesResponseType((int)HttpStatusCode.OK, Type = typeof(GanjoorPoetSuggestedSpecLineViewModel))]
|
||||
[ProducesResponseType((int)HttpStatusCode.BadRequest, Type = typeof(string))]
|
||||
[ProducesResponseType((int)HttpStatusCode.NotFound)]
|
||||
public async Task<IActionResult> GetNextUnmoderatedPoetSuggestedSpecLineAsync(int skip)
|
||||
{
|
||||
var res = await _ganjoorService.GetNextUnmoderatedPoetSuggestedSpecLineAsync(skip);
|
||||
if (!string.IsNullOrEmpty(res.ExceptionString))
|
||||
return BadRequest(res.ExceptionString);
|
||||
if (res.Result == null)
|
||||
return NotFound();
|
||||
return Ok(res.Result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user