This commit is contained in:
Hamid Reza Mohammadi 2025-01-25 17:25:38 +03:30
parent f2105b9820
commit dfc892590b
6 changed files with 7 additions and 19 deletions

View File

@ -50,7 +50,7 @@ namespace RMuseum.Controllers
var l = res.Result;
bool keepHistory = false;
var kRes = await _optionsService.GetValueAsync("KeepHistory", l.User.Id, null);
var kRes = await _optionsService.GetValueAsync("KeepHistory", l.User.Id);
if (!string.IsNullOrEmpty(kRes.Result))
bool.TryParse(kRes.Result, out keepHistory);
@ -92,7 +92,7 @@ namespace RMuseum.Controllers
var l = res.Result;
bool keepHistory = false;
var kRes = await _optionsService.GetValueAsync("KeepHistory", l.User.Id, null);
var kRes = await _optionsService.GetValueAsync("KeepHistory", l.User.Id);
if (!string.IsNullOrEmpty(kRes.Result))
bool.TryParse(kRes.Result, out keepHistory);

View File

@ -27,7 +27,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NAudio" Version="2.2.1" />
<PackageReference Include="RSecurityBackend" Version="1.5.5" />
<PackageReference Include="RSecurityBackend" Version="1.5.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="7.2.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="8.0.2" />

View File

@ -4319,18 +4319,6 @@
<member name="M:RMuseum.Migrations.LimitedFieldLengths1.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
<inheritdoc />
</member>
<member name="T:RMuseum.Migrations.LimitFieldLengths">
<inheritdoc />
</member>
<member name="M:RMuseum.Migrations.LimitFieldLengths.Up(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
<inheritdoc />
</member>
<member name="M:RMuseum.Migrations.LimitFieldLengths.Down(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
<inheritdoc />
</member>
<member name="M:RMuseum.Migrations.LimitFieldLengths.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
<inheritdoc />
</member>
<member name="T:RMuseum.Models.Accounting.DonationExpenditure">
<summary>
donation expenditures

View File

@ -77,7 +77,7 @@ namespace RMuseum.Services.Implementation
int lastFinishedPoetId = 0;
if (!reset)
{
var resOption = await _optionsService.GetValueAsync("CategoryWordCountsLastPoetId", null, null);
var resOption = await _optionsService.GetValueAsync("CategoryWordCountsLastPoetId", null);
if (!string.IsNullOrEmpty(resOption.Result))
{
lastFinishedPoetId = int.Parse(resOption.Result);

View File

@ -1040,7 +1040,7 @@ namespace RMuseum.Services.Implementation
}
PublishStatus status = PublishStatus.Published;
var keepFirstTimeUsersComments = await _optionsService.GetValueAsync("KeepFirstTimeUsersComments", null, null);
var keepFirstTimeUsersComments = await _optionsService.GetValueAsync("KeepFirstTimeUsersComments", null);
if (keepFirstTimeUsersComments.Result == true.ToString())
{
if ((await _context.GanjoorComments.AsNoTracking().Where(c => c.UserId == userId && c.Status == PublishStatus.Published).AnyAsync()) == false)//First time commenter

View File

@ -26,7 +26,7 @@ namespace RMuseum.Services.Implementation
public async Task<RServiceResult<bool>> AddAsync(Guid userId, int poemId)
{
bool keepHistory = false;
var kRes = await _optionsService.GetValueAsync("KeepHistory", userId, null);
var kRes = await _optionsService.GetValueAsync("KeepHistory", userId);
if (!string.IsNullOrEmpty(kRes.Result))
bool.TryParse(kRes.Result, out keepHistory);
if (!keepHistory)
@ -75,7 +75,7 @@ namespace RMuseum.Services.Implementation
/// <returns></returns>
public async Task<RServiceResult<bool>> SwitchTrackingAsync(Guid userId, bool start)
{
var res = await _optionsService.SetAsync("KeepHistory", start.ToString(), userId, null);
var res = await _optionsService.SetAsync("KeepHistory", start.ToString(), userId);
if (!string.IsNullOrEmpty(res.ExceptionString))
return new RServiceResult<bool>(false, res.ExceptionString);
if(!start)