docs: #275 restoring userid for GanjoorPoetSuggestedSpecLine

This commit is contained in:
Hamid Reza Mohammadi 2022-01-27 11:23:01 +03:30
parent 97b713c2de
commit c691fc2f37
3 changed files with 29 additions and 3 deletions

View File

@ -1,4 +1,7 @@
namespace RMuseum.Models.Ganjoor
using RSecurityBackend.Models.Auth.Db;
using System;
namespace RMuseum.Models.Ganjoor
{
/// <summary>
/// Ganjoor Poet Specification
@ -35,6 +38,15 @@
/// </summary>
public bool Published { get; set; }
/// <summary>
/// suggested by id
/// </summary>
public Guid? SuggestedById { get; set; }
/// <summary>
/// suggested by
/// </summary>
public virtual RAppUser SuggestedBy { get; set; }
}
}

View File

@ -6388,6 +6388,16 @@
published
</summary>
</member>
<member name="P:RMuseum.Models.Ganjoor.GanjoorPoetSuggestedSpecLine.SuggestedById">
<summary>
suggested by id
</summary>
</member>
<member name="P:RMuseum.Models.Ganjoor.GanjoorPoetSuggestedSpecLine.SuggestedBy">
<summary>
suggested by
</summary>
</member>
<member name="T:RMuseum.Models.Ganjoor.GanjoorSiteBanner">
<summary>
ganjoor.net site banner
@ -11779,11 +11789,12 @@
</summary>
<returns></returns>
</member>
<member name="M:RMuseum.Services.Implementation.GanjoorService.GetPoetSuggestedSpecLines(System.Int32,System.Boolean)">
<member name="M:RMuseum.Services.Implementation.GanjoorService.GetPoetSuggestedSpecLines(System.Int32,System.Nullable{System.Guid},System.Boolean)">
<summary>
return list of suggested spec lines
</summary>
<param name="poetId"></param>
<param name="userId"></param>
<param name="includeUnpublished"></param>
<returns></returns>
</member>

View File

@ -25,9 +25,10 @@ namespace RMuseum.Services.Implementation
/// return list of suggested spec lines
/// </summary>
/// <param name="poetId"></param>
/// <param name="userId"></param>
/// <param name="includeUnpublished"></param>
/// <returns></returns>
public async Task<RServiceResult<GanjoorPoetSuggestedSpecLine[]>> GetPoetSuggestedSpecLines(int poetId, bool includeUnpublished)
public async Task<RServiceResult<GanjoorPoetSuggestedSpecLine[]>> GetPoetSuggestedSpecLines(int poetId, Guid? userId, bool includeUnpublished)
{
return new RServiceResult<GanjoorPoetSuggestedSpecLine[]>
(
@ -37,6 +38,8 @@ namespace RMuseum.Services.Implementation
r => r.PoetId == poetId
&&
(includeUnpublished || r.Published == true)
&&
(userId == null || r.SuggestedById == userId)
)
.OrderBy(r => r.LineOrder)
.ToArrayAsync()