#418 refactoring
This commit is contained in:
parent
2641c4d6f2
commit
adffd5034d
@ -3662,10 +3662,10 @@ namespace RMuseum.Controllers
|
||||
[AllowAnonymous]
|
||||
[ProducesResponseType((int)HttpStatusCode.OK, Type = typeof(GanjoorQuotedPoem[]))]
|
||||
[ProducesResponseType((int)HttpStatusCode.BadRequest, Type = typeof(string))]
|
||||
public async Task<IActionResult> GetGanjoorQuotedPoemsAsync(int id, int skip, int itemsCount)
|
||||
public async Task<IActionResult> GetGanjoorQuotedPoemsForPoemAsync(int id, int skip, int itemsCount)
|
||||
{
|
||||
RServiceResult<GanjoorQuotedPoem[]> res =
|
||||
await _ganjoorService.GetGanjoorQuotedPoemsAsync(id, skip, itemsCount);
|
||||
await _ganjoorService.GetGanjoorQuotedPoemsForPoemAsync(id, skip, itemsCount);
|
||||
if (!string.IsNullOrEmpty(res.ExceptionString))
|
||||
return BadRequest(res.ExceptionString);
|
||||
return Ok(res.Result);
|
||||
|
||||
@ -2013,7 +2013,7 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Controllers.GanjoorController.GetGanjoorQuotedPoemsAsync(System.Int32,System.Int32,System.Int32)">
|
||||
<member name="M:RMuseum.Controllers.GanjoorController.GetGanjoorQuotedPoemsForPoemAsync(System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
get quoted poems for a poem
|
||||
</summary>
|
||||
@ -15462,7 +15462,7 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.IGanjoorService.GetGanjoorQuotedPoemsAsync(System.Int32,System.Int32,System.Int32)">
|
||||
<member name="M:RMuseum.Services.IGanjoorService.GetGanjoorQuotedPoemsForPoemAsync(System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
get quoted poems for a poem
|
||||
</summary>
|
||||
@ -17455,7 +17455,7 @@
|
||||
<param name="metre"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.Implementation.GanjoorService.GetGanjoorQuotedPoemsAsync(System.Int32,System.Int32,System.Int32)">
|
||||
<member name="M:RMuseum.Services.Implementation.GanjoorService.GetGanjoorQuotedPoemsForPoemAsync(System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
get quoted poems for a poem
|
||||
</summary>
|
||||
|
||||
@ -1224,7 +1224,7 @@ namespace RMuseum.Services
|
||||
/// <param name="skip"></param>
|
||||
/// <param name="itemsCount"></param>
|
||||
/// <returns></returns>
|
||||
Task<RServiceResult<GanjoorQuotedPoem[]>> GetGanjoorQuotedPoemsAsync(int poemId, int skip, int itemsCount);
|
||||
Task<RServiceResult<GanjoorQuotedPoem[]>> GetGanjoorQuotedPoemsForPoemAsync(int poemId, int skip, int itemsCount);
|
||||
|
||||
/// <summary>
|
||||
/// two poems quoted records
|
||||
|
||||
@ -22,7 +22,7 @@ namespace RMuseum.Services.Implementation
|
||||
/// <param name="skip"></param>
|
||||
/// <param name="itemsCount"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RServiceResult<GanjoorQuotedPoem[]>> GetGanjoorQuotedPoemsAsync(int poemId, int skip, int itemsCount)
|
||||
public async Task<RServiceResult<GanjoorQuotedPoem[]>> GetGanjoorQuotedPoemsForPoemAsync(int poemId, int skip, int itemsCount)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -71,6 +71,7 @@ namespace RMuseum.Services.Implementation
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// extracting quoted poems
|
||||
/// </summary>
|
||||
|
||||
@ -1867,7 +1867,7 @@ namespace RMuseum.Services.Implementation
|
||||
return new RServiceResult<GanjoorPoemCompleteViewModel>(null, tagsRes.ExceptionString);
|
||||
PoemGeoDateTag[] geoDateTags = tagsRes.Result;
|
||||
|
||||
var quotedRes = await GetGanjoorQuotedPoemsAsync(id, 0, 6);
|
||||
var quotedRes = await GetGanjoorQuotedPoemsForPoemAsync(id, 0, 6);
|
||||
if (!string.IsNullOrEmpty(quotedRes.ExceptionString))
|
||||
return new RServiceResult<GanjoorPoemCompleteViewModel>(null, quotedRes.ExceptionString);
|
||||
GanjoorQuotedPoem[] quoteds = quotedRes.Result;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user