Polish 2 (#3555)
Co-authored-by: Robbie Davis <robbie@therobbiedavis.com> Co-authored-by: Fesaa <77553571+Fesaa@users.noreply.github.com>
This commit is contained in:
parent
b858729c9e
commit
9565fe7360
57 changed files with 777 additions and 314 deletions
|
@ -19,6 +19,7 @@ namespace API.Data.Repositories;
|
|||
public interface IAppUserProgressRepository
|
||||
{
|
||||
void Update(AppUserProgress userProgress);
|
||||
void Remove(AppUserProgress userProgress);
|
||||
Task<int> CleanupAbandonedChapters();
|
||||
Task<bool> UserHasProgress(LibraryType libraryType, int userId);
|
||||
Task<AppUserProgress?> GetUserProgressAsync(int chapterId, int userId);
|
||||
|
@ -57,6 +58,11 @@ public class AppUserProgressRepository : IAppUserProgressRepository
|
|||
_context.Entry(userProgress).State = EntityState.Modified;
|
||||
}
|
||||
|
||||
public void Remove(AppUserProgress userProgress)
|
||||
{
|
||||
_context.Remove(userProgress);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This will remove any entries that have chapterIds that no longer exists. This will execute the save as well.
|
||||
/// </summary>
|
||||
|
|
|
@ -1848,7 +1848,7 @@ public class SeriesRepository : ISeriesRepository
|
|||
.ToList();
|
||||
|
||||
// Prefer the first match or handle duplicates by choosing the last one
|
||||
if (matchingSeries.Any())
|
||||
if (matchingSeries.Count != 0)
|
||||
{
|
||||
ids.Add(matchingSeries.Last().Id);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue