From dfc892590bbdbeaa65cc9ff6e8ceb63543fe129b Mon Sep 17 00:00:00 2001 From: Hamid Reza Mohammadi Date: Sat, 25 Jan 2025 17:25:38 +0330 Subject: [PATCH] fix --- RMuseum/Controllers/AppUserController.cs | 4 ++-- RMuseum/RMuseum.csproj | 2 +- RMuseum/RMuseum.xml | 12 ------------ .../GanjoorService-CategoryWordCounts.cs | 2 +- RMuseum/Services/Implementation/GanjoorService.cs | 2 +- .../Implementation/UserVisitsTrackingService.cs | 4 ++-- 6 files changed, 7 insertions(+), 19 deletions(-) diff --git a/RMuseum/Controllers/AppUserController.cs b/RMuseum/Controllers/AppUserController.cs index c35efbdd..e79cf9de 100644 --- a/RMuseum/Controllers/AppUserController.cs +++ b/RMuseum/Controllers/AppUserController.cs @@ -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); diff --git a/RMuseum/RMuseum.csproj b/RMuseum/RMuseum.csproj index 538ced0f..57915c49 100644 --- a/RMuseum/RMuseum.csproj +++ b/RMuseum/RMuseum.csproj @@ -27,7 +27,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/RMuseum/RMuseum.xml b/RMuseum/RMuseum.xml index 0564d09b..4bbaf020 100644 --- a/RMuseum/RMuseum.xml +++ b/RMuseum/RMuseum.xml @@ -4319,18 +4319,6 @@ - - - - - - - - - - - - donation expenditures diff --git a/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-CategoryWordCounts.cs b/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-CategoryWordCounts.cs index 8a8925ef..7aa528d0 100644 --- a/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-CategoryWordCounts.cs +++ b/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-CategoryWordCounts.cs @@ -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); diff --git a/RMuseum/Services/Implementation/GanjoorService.cs b/RMuseum/Services/Implementation/GanjoorService.cs index e26f3249..69045220 100644 --- a/RMuseum/Services/Implementation/GanjoorService.cs +++ b/RMuseum/Services/Implementation/GanjoorService.cs @@ -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 diff --git a/RMuseum/Services/Implementation/UserVisitsTrackingService.cs b/RMuseum/Services/Implementation/UserVisitsTrackingService.cs index db94a909..3694bf02 100644 --- a/RMuseum/Services/Implementation/UserVisitsTrackingService.cs +++ b/RMuseum/Services/Implementation/UserVisitsTrackingService.cs @@ -26,7 +26,7 @@ namespace RMuseum.Services.Implementation public async Task> 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 /// public async Task> 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(false, res.ExceptionString); if(!start)