mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-05 02:14:17 +02:00
Split UpdateFilesDownloadedJob.cs to UpdateChaptersDownloadedJob.cs and split into UpdateSingleChapterDownloadedJob.cs
This commit is contained in:
API
Controllers
Migrations
pgsql
20250515120724_Initial-1.Designer.cs20250516121442_AltTitle-Owned.Designer.cs20250516121725_Manga-Year-Nullable.Designer.cs20250516122242_AltTitle-Owned-WithId.Designer.cs20250516180953_Split-UpdateChaptersDownloadedJob-Into-UpdateSingleChapterDownloadedJob.Designer.cs20250516180953_Split-UpdateChaptersDownloadedJob-Into-UpdateSingleChapterDownloadedJob.csPgsqlContextModelSnapshot.cs
Schema
Contexts
Jobs
@ -158,7 +158,7 @@ public class JobController(PgsqlContext context, ILog Log) : Controller
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new UpdateFilesDownloadedJob
|
||||
/// Create a new UpdateChaptersDownloadedJob
|
||||
/// </summary>
|
||||
/// <param name="MangaId">ID of the Manga</param>
|
||||
/// <response code="201">Job-IDs</response>
|
||||
@ -172,7 +172,7 @@ public class JobController(PgsqlContext context, ILog Log) : Controller
|
||||
{
|
||||
if(context.Mangas.Find(MangaId) is not { } m)
|
||||
return NotFound();
|
||||
Job job = new UpdateFilesDownloadedJob(m, 0);
|
||||
Job job = new UpdateChaptersDownloadedJob(m, 0);
|
||||
return AddJobs([job]);
|
||||
}
|
||||
|
||||
@ -186,7 +186,7 @@ public class JobController(PgsqlContext context, ILog Log) : Controller
|
||||
[ProducesResponseType<string>(Status500InternalServerError, "text/plain")]
|
||||
public IActionResult CreateUpdateAllFilesDownloadedJob()
|
||||
{
|
||||
List<UpdateFilesDownloadedJob> jobs = context.Mangas.Select(m => new UpdateFilesDownloadedJob(m, 0, null, null)).ToList();
|
||||
List<UpdateChaptersDownloadedJob> jobs = context.Mangas.Select(m => new UpdateChaptersDownloadedJob(m, 0, null, null)).ToList();
|
||||
try
|
||||
{
|
||||
context.Jobs.AddRange(jobs);
|
||||
|
Reference in New Issue
Block a user