diff --git a/RMuseum/RMuseum.xml b/RMuseum/RMuseum.xml
index f3ddaec3..c3f63787 100644
--- a/RMuseum/RMuseum.xml
+++ b/RMuseum/RMuseum.xml
@@ -20600,6 +20600,14 @@
+
+
+ delete unreviewed user corrections for a cat
+
+
+
+
+
aggressive cache
diff --git a/RMuseum/Services/Implementation/GanjoorService.cs b/RMuseum/Services/Implementation/GanjoorService.cs
index a923b061..1d2f169b 100644
--- a/RMuseum/Services/Implementation/GanjoorService.cs
+++ b/RMuseum/Services/Implementation/GanjoorService.cs
@@ -3916,6 +3916,25 @@ namespace RMuseum.Services.Implementation
return new RServiceResult(correction);
}
+ ///
+ /// delete unreviewed user corrections for a cat
+ ///
+ ///
+ ///
+ ///
+ public async Task> DeleteCatCorrectionsAsync(Guid userId, int catId)
+ {
+ var preCorrections = await _context.GanjoorCatCorrections
+ .Where(c => c.UserId == userId && c.CatId == catId && c.Reviewed == false)
+ .ToListAsync();
+ if (preCorrections.Count > 0)
+ {
+ _context.GanjoorCatCorrections.RemoveRange(preCorrections);
+ await _context.SaveChangesAsync();
+ }
+ return new RServiceResult(true);
+ }
+
///
/// aggressive cache