diff --git a/RMuseum/RMuseum.xml b/RMuseum/RMuseum.xml index 664052bd..ac1a7417 100644 --- a/RMuseum/RMuseum.xml +++ b/RMuseum/RMuseum.xml @@ -17411,6 +17411,67 @@ + + + send cat correction + + + + + + + delete unreviewed user corrections for a cat + + + + + + + + last unreviewed user correction for a cat + + + + + + + + get user or all corrections for categories + + if sent empty returns all corrections + + + + + + cat effectinve corrections + + + + + + + + get cat correction by id + + + + + + + get next unreviewed cat correction + + + + + + + + unreviewed cat corrections count + + + + translation service implementation @@ -20608,7 +20669,7 @@ last unreviewed user correction for a cat - + diff --git a/RMuseum/Services/IGanjoorService.cs b/RMuseum/Services/IGanjoorService.cs index 686eb51d..47b37ee1 100644 --- a/RMuseum/Services/IGanjoorService.cs +++ b/RMuseum/Services/IGanjoorService.cs @@ -1550,5 +1550,72 @@ namespace RMuseum.Services /// void OpenAIStartFillingGeoLocations(int startFrom, int count); + /// + /// send cat correction + /// + /// + /// + Task> SuggestCatCorrectionAsync(GanjoorCatCorrectionViewModel correction); + + + /// + /// delete unreviewed user corrections for a cat + /// + /// + /// + /// + Task> DeleteCatCorrectionsAsync(Guid userId, int catId); + + /// + /// last unreviewed user correction for a cat + /// + /// + /// + /// + Task> GetLastUnreviewedUserCorrectionForCatAsync(Guid userId, int catId); + + + + /// + /// get user or all corrections for categories + /// + /// if sent empty returns all corrections + /// + /// + Task> GetUserCatCorrectionsAsync(Guid userId, PagingParameterModel paging); + + + /// + /// cat effectinve corrections + /// + /// + /// + /// + Task> GetCatEffectiveCorrectionsAsync(int catId, PagingParameterModel paging); + + + /// + /// get cat correction by id + /// + /// + /// + Task> GetCatCorrectionByIdAsync(int id); + + /// + /// get next unreviewed cat correction + /// + /// + /// + /// + Task> GetNextUnreviewedCatCorrectionAsync(int skip, bool onlyUserCorrections); + + + /// + /// unreviewed cat corrections count + /// + /// + /// + Task> GetUnreviewedCatCorrectionCountAsync(bool onlyUserCorrections); + } } diff --git a/RMuseum/Services/Implementation/GanjoorService.cs b/RMuseum/Services/Implementation/GanjoorService.cs index 9761e106..d7244c81 100644 --- a/RMuseum/Services/Implementation/GanjoorService.cs +++ b/RMuseum/Services/Implementation/GanjoorService.cs @@ -3939,12 +3939,12 @@ namespace RMuseum.Services.Implementation /// last unreviewed user correction for a cat /// /// - /// + /// /// - public async Task> GetLastUnreviewedUserCorrectionForCatAsync(Guid userId, int catID) + public async Task> GetLastUnreviewedUserCorrectionForCatAsync(Guid userId, int catId) { var dbCorrection = await _context.GanjoorCatCorrections.AsNoTracking().Include(c => c.User) - .Where(c => c.UserId == userId && c.CatId == catID && c.Reviewed == false) + .Where(c => c.UserId == userId && c.CatId == catId && c.Reviewed == false) .OrderByDescending(c => c.Id) .FirstOrDefaultAsync();