Replace occurences of "ID" with more meaningful names in documentation

This commit is contained in:
Glax 2025-03-08 13:26:07 +01:00
parent 73eb02e7cb
commit 94678e744f
5 changed files with 88 additions and 88 deletions

View File

@ -40,41 +40,41 @@ public class JobController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Get all Jobs in requested State /// Get all Jobs in requested State
/// </summary> /// </summary>
/// <param name="state">Requested Job-State</param> /// <param name="JobState">Requested Job-State</param>
/// <response code="200"></response> /// <response code="200"></response>
[HttpGet("State/{state}")] [HttpGet("State/{JobState}")]
[ProducesResponseType<Job[]>(Status200OK, "application/json")] [ProducesResponseType<Job[]>(Status200OK, "application/json")]
public IActionResult GetJobsInState(JobState state) public IActionResult GetJobsInState(JobState JobState)
{ {
Job[] jobsInState = context.Jobs.Where(job => job.state == state).ToArray(); Job[] jobsInState = context.Jobs.Where(job => job.state == JobState).ToArray();
return Ok(jobsInState); return Ok(jobsInState);
} }
/// <summary> /// <summary>
/// Returns all Jobs of requested Type /// Returns all Jobs of requested Type
/// </summary> /// </summary>
/// <param name="type">Requested Job-Type</param> /// <param name="JobType">Requested Job-Type</param>
/// <response code="200"></response> /// <response code="200"></response>
[HttpGet("Type/{type}")] [HttpGet("Type/{JobType}")]
[ProducesResponseType<Job[]>(Status200OK, "application/json")] [ProducesResponseType<Job[]>(Status200OK, "application/json")]
public IActionResult GetJobsOfType(JobType type) public IActionResult GetJobsOfType(JobType JobType)
{ {
Job[] jobsOfType = context.Jobs.Where(job => job.JobType == type).ToArray(); Job[] jobsOfType = context.Jobs.Where(job => job.JobType == JobType).ToArray();
return Ok(jobsOfType); return Ok(jobsOfType);
} }
/// <summary> /// <summary>
/// Return Job with ID /// Return Job with ID
/// </summary> /// </summary>
/// <param name="id">Job-ID</param> /// <param name="JobId">Job-ID</param>
/// <response code="200"></response> /// <response code="200"></response>
/// <response code="404">Job with ID could not be found</response> /// <response code="404">Job with ID could not be found</response>
[HttpGet("{id}")] [HttpGet("{JobId}")]
[ProducesResponseType<Job>(Status200OK, "application/json")] [ProducesResponseType<Job>(Status200OK, "application/json")]
[ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status404NotFound)]
public IActionResult GetJob(string id) public IActionResult GetJob(string JobId)
{ {
Job? ret = context.Jobs.Find(id); Job? ret = context.Jobs.Find(JobId);
return (ret is not null) switch return (ret is not null) switch
{ {
true => Ok(ret), true => Ok(ret),
@ -85,46 +85,46 @@ public class JobController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Create a new CreateNewDownloadChapterJob /// Create a new CreateNewDownloadChapterJob
/// </summary> /// </summary>
/// <param name="mangaId">ID of Manga</param> /// <param name="MangaId">ID of Manga</param>
/// <param name="recurrenceTime">How often should we check for new chapters</param> /// <param name="recurrenceTime">How often should we check for new chapters</param>
/// <response code="201">Created new Job</response> /// <response code="201">Created new Job</response>
/// <response code="500">Error during Database Operation</response> /// <response code="500">Error during Database Operation</response>
[HttpPut("NewDownloadChapterJob/{mangaId}")] [HttpPut("NewDownloadChapterJob/{MangaId}")]
[ProducesResponseType(Status201Created)] [ProducesResponseType(Status201Created)]
[ProducesResponseType<string>(Status500InternalServerError, "text/plain")] [ProducesResponseType<string>(Status500InternalServerError, "text/plain")]
public IActionResult CreateNewDownloadChapterJob(string mangaId, [FromBody]ulong recurrenceTime) public IActionResult CreateNewDownloadChapterJob(string MangaId, [FromBody]ulong recurrenceTime)
{ {
Job job = new DownloadNewChaptersJob(recurrenceTime, mangaId); Job job = new DownloadNewChaptersJob(recurrenceTime, MangaId);
return AddJob(job); return AddJob(job);
} }
/// <summary> /// <summary>
/// Create a new DownloadSingleChapterJob /// Create a new DownloadSingleChapterJob
/// </summary> /// </summary>
/// <param name="chapterId">ID of the Chapter</param> /// <param name="ChapterId">ID of the Chapter</param>
/// <response code="201">Created new Job</response> /// <response code="201">Created new Job</response>
/// <response code="500">Error during Database Operation</response> /// <response code="500">Error during Database Operation</response>
[HttpPut("DownloadSingleChapterJob/{chapterId}")] [HttpPut("DownloadSingleChapterJob/{ChapterId}")]
[ProducesResponseType(Status201Created)] [ProducesResponseType(Status201Created)]
[ProducesResponseType<string>(Status500InternalServerError, "text/plain")] [ProducesResponseType<string>(Status500InternalServerError, "text/plain")]
public IActionResult CreateNewDownloadChapterJob(string chapterId) public IActionResult CreateNewDownloadChapterJob(string ChapterId)
{ {
Job job = new DownloadSingleChapterJob(chapterId); Job job = new DownloadSingleChapterJob(ChapterId);
return AddJob(job); return AddJob(job);
} }
/// <summary> /// <summary>
/// Create a new UpdateMetadataJob /// Create a new UpdateMetadataJob
/// </summary> /// </summary>
/// <param name="mangaId">ID of the Manga</param> /// <param name="MangaId">ID of the Manga</param>
/// <response code="201">Created new Job</response> /// <response code="201">Created new Job</response>
/// <response code="500">Error during Database Operation</response> /// <response code="500">Error during Database Operation</response>
[HttpPut("UpdateMetadataJob/{mangaId}")] [HttpPut("UpdateMetadataJob/{MangaId}")]
[ProducesResponseType(Status201Created)] [ProducesResponseType(Status201Created)]
[ProducesResponseType<string>(Status500InternalServerError, "text/plain")] [ProducesResponseType<string>(Status500InternalServerError, "text/plain")]
public IActionResult CreateUpdateMetadataJob(string mangaId) public IActionResult CreateUpdateMetadataJob(string MangaId)
{ {
Job job = new UpdateMetadataJob(0, mangaId); Job job = new UpdateMetadataJob(0, MangaId);
return AddJob(job); return AddJob(job);
} }
@ -169,22 +169,22 @@ public class JobController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Delete Job with ID and all children /// Delete Job with ID and all children
/// </summary> /// </summary>
/// <param name="id">Job-ID</param> /// <param name="JobId">Job-ID</param>
/// <response code="200">Job(s) deleted</response> /// <response code="200">Job(s) deleted</response>
/// <response code="404">Job could not be found</response> /// <response code="404">Job could not be found</response>
/// <response code="500">Error during Database Operation</response> /// <response code="500">Error during Database Operation</response>
[HttpDelete("{id}")] [HttpDelete("{JobId}")]
[ProducesResponseType<string[]>(Status200OK, "application/json")] [ProducesResponseType<string[]>(Status200OK, "application/json")]
[ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status404NotFound)]
[ProducesResponseType<string>(Status500InternalServerError, "text/plain")] [ProducesResponseType<string>(Status500InternalServerError, "text/plain")]
public IActionResult DeleteJob(string id) public IActionResult DeleteJob(string JobId)
{ {
try try
{ {
Job? ret = context.Jobs.Find(id); Job? ret = context.Jobs.Find(JobId);
if(ret is null) if(ret is null)
return NotFound(); return NotFound();
IQueryable<Job> children = GetChildJobs(id); IQueryable<Job> children = GetChildJobs(JobId);
context.RemoveRange(children); context.RemoveRange(children);
context.Remove(ret); context.Remove(ret);
@ -209,22 +209,22 @@ public class JobController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Modify Job with ID /// Modify Job with ID
/// </summary> /// </summary>
/// <param name="id">Job-ID</param> /// <param name="JobId">Job-ID</param>
/// <param name="modifyJobRecord">Fields to modify, set to null to keep previous value</param> /// <param name="modifyJobRecord">Fields to modify, set to null to keep previous value</param>
/// <response code="202">Job modified</response> /// <response code="202">Job modified</response>
/// <response code="400">Malformed request</response> /// <response code="400">Malformed request</response>
/// <response code="404">Job with ID not found</response> /// <response code="404">Job with ID not found</response>
/// <response code="500">Error during Database Operation</response> /// <response code="500">Error during Database Operation</response>
[HttpPatch("{id}/")] [HttpPatch("{JobId}")]
[ProducesResponseType<Job>(Status202Accepted, "application/json")] [ProducesResponseType<Job>(Status202Accepted, "application/json")]
[ProducesResponseType(Status400BadRequest)] [ProducesResponseType(Status400BadRequest)]
[ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status404NotFound)]
[ProducesResponseType<string>(Status500InternalServerError, "text/plain")] [ProducesResponseType<string>(Status500InternalServerError, "text/plain")]
public IActionResult ModifyJob(string id, [FromBody]ModifyJobRecord modifyJobRecord) public IActionResult ModifyJob(string JobId, [FromBody]ModifyJobRecord modifyJobRecord)
{ {
try try
{ {
Job? ret = context.Jobs.Find(id); Job? ret = context.Jobs.Find(JobId);
if(ret is null) if(ret is null)
return NotFound(); return NotFound();
@ -243,19 +243,19 @@ public class JobController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Starts the Job with the requested ID /// Starts the Job with the requested ID
/// </summary> /// </summary>
/// <param name="id">Job-ID</param> /// <param name="JobId">Job-ID</param>
/// <response code="202">Job started</response> /// <response code="202">Job started</response>
/// <response code="404">Job with ID not found</response> /// <response code="404">Job with ID not found</response>
/// <response code="409">Job was already running</response> /// <response code="409">Job was already running</response>
/// <response code="500">Error during Database Operation</response> /// <response code="500">Error during Database Operation</response>
[HttpPost("{id}/Start")] [HttpPost("{JobId}/Start")]
[ProducesResponseType(Status202Accepted)] [ProducesResponseType(Status202Accepted)]
[ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status404NotFound)]
[ProducesResponseType(Status409Conflict)] [ProducesResponseType(Status409Conflict)]
[ProducesResponseType<string>(Status500InternalServerError, "text/plain")] [ProducesResponseType<string>(Status500InternalServerError, "text/plain")]
public IActionResult StartJob(string id) public IActionResult StartJob(string JobId)
{ {
Job? ret = context.Jobs.Find(id); Job? ret = context.Jobs.Find(JobId);
if (ret is null) if (ret is null)
return NotFound(); return NotFound();
try try
@ -275,10 +275,10 @@ public class JobController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Stops the Job with the requested ID /// Stops the Job with the requested ID
/// </summary> /// </summary>
/// <param name="id">Job-ID</param> /// <param name="JobId">Job-ID</param>
/// <remarks>NOT IMPLEMENTED</remarks> /// <remarks>NOT IMPLEMENTED</remarks>
[HttpPost("{id}/Stop")] [HttpPost("{JobId}/Stop")]
public IActionResult StopJob(string id) public IActionResult StopJob(string JobId)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

@ -26,15 +26,15 @@ public class LibraryConnectorController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Returns Library-Connector with requested ID /// Returns Library-Connector with requested ID
/// </summary> /// </summary>
/// <param name="id">Library-Connector-ID</param> /// <param name="LibraryControllerId">Library-Connector-ID</param>
/// <response code="200"></response> /// <response code="200"></response>
/// <response code="404">Connector with ID not found.</response> /// <response code="404">Connector with ID not found.</response>
[HttpGet("{id}")] [HttpGet("{LibraryControllerId}")]
[ProducesResponseType<LibraryConnector>(Status200OK, "application/json")] [ProducesResponseType<LibraryConnector>(Status200OK, "application/json")]
[ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status404NotFound)]
public IActionResult GetConnector(string id) public IActionResult GetConnector(string LibraryControllerId)
{ {
LibraryConnector? ret = context.LibraryConnectors.Find(id); LibraryConnector? ret = context.LibraryConnectors.Find(LibraryControllerId);
return (ret is not null) switch return (ret is not null) switch
{ {
true => Ok(ret), true => Ok(ret),
@ -68,19 +68,19 @@ public class LibraryConnectorController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Deletes the Library-Connector with the requested ID /// Deletes the Library-Connector with the requested ID
/// </summary> /// </summary>
/// <param name="id">Library-Connector-ID</param> /// <param name="LibraryControllerId">Library-Connector-ID</param>
/// <response code="200"></response> /// <response code="200"></response>
/// <response code="404">Connector with ID not found.</response> /// <response code="404">Connector with ID not found.</response>
/// <response code="500">Error during Database Operation</response> /// <response code="500">Error during Database Operation</response>
[HttpDelete("{id}")] [HttpDelete("{LibraryControllerId}")]
[ProducesResponseType(Status200OK)] [ProducesResponseType(Status200OK)]
[ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status404NotFound)]
[ProducesResponseType<string>(Status500InternalServerError, "text/plain")] [ProducesResponseType<string>(Status500InternalServerError, "text/plain")]
public IActionResult DeleteConnector(string id) public IActionResult DeleteConnector(string LibraryControllerId)
{ {
try try
{ {
LibraryConnector? ret = context.LibraryConnectors.Find(id); LibraryConnector? ret = context.LibraryConnectors.Find(LibraryControllerId);
if (ret is null) if (ret is null)
return NotFound(); return NotFound();

View File

@ -55,7 +55,7 @@ public class MangaConnectorController(PgsqlContext context) : Controller
/// <response code="200"></response> /// <response code="200"></response>
/// <response code="404">Connector with ID not found.</response> /// <response code="404">Connector with ID not found.</response>
/// <response code="500">Error during Database Operation</response> /// <response code="500">Error during Database Operation</response>
[HttpPatch("{id}/SetEnabled/{enabled}")] [HttpPatch("{MangaConnectorName}/SetEnabled/{enabled}")]
[ProducesResponseType(Status200OK)] [ProducesResponseType(Status200OK)]
[ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status404NotFound)]
[ProducesResponseType<string>(Status500InternalServerError, "text/plain")] [ProducesResponseType<string>(Status500InternalServerError, "text/plain")]

View File

@ -44,15 +44,15 @@ public class MangaController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Return Manga with ID /// Return Manga with ID
/// </summary> /// </summary>
/// <param name="id">Manga-ID</param> /// <param name="MangaId">Manga-ID</param>
/// <response code="200"></response> /// <response code="200"></response>
/// <response code="404">Manga with ID not found</response> /// <response code="404">Manga with ID not found</response>
[HttpGet("{id}")] [HttpGet("{MangaId}")]
[ProducesResponseType<Manga>(Status200OK, "application/json")] [ProducesResponseType<Manga>(Status200OK, "application/json")]
[ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status404NotFound)]
public IActionResult GetManga(string id) public IActionResult GetManga(string MangaId)
{ {
Manga? ret = context.Manga.Find(id); Manga? ret = context.Manga.Find(MangaId);
if (ret is null) if (ret is null)
return NotFound(); return NotFound();
return Ok(ret); return Ok(ret);
@ -61,19 +61,19 @@ public class MangaController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Delete Manga with ID /// Delete Manga with ID
/// </summary> /// </summary>
/// <param name="id">Manga-ID</param> /// <param name="MangaId">Manga-ID</param>
/// <response code="200"></response> /// <response code="200"></response>
/// <response code="404">Manga with ID not found</response> /// <response code="404">Manga with ID not found</response>
/// <response code="500">Error during Database Operation</response> /// <response code="500">Error during Database Operation</response>
[HttpDelete("{id}")] [HttpDelete("{MangaId}")]
[ProducesResponseType(Status200OK)] [ProducesResponseType(Status200OK)]
[ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status404NotFound)]
[ProducesResponseType<string>(Status500InternalServerError, "text/plain")] [ProducesResponseType<string>(Status500InternalServerError, "text/plain")]
public IActionResult DeleteManga(string id) public IActionResult DeleteManga(string MangaId)
{ {
try try
{ {
Manga? ret = context.Manga.Find(id); Manga? ret = context.Manga.Find(MangaId);
if (ret is null) if (ret is null)
return NotFound(); return NotFound();
@ -90,20 +90,20 @@ public class MangaController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Returns Cover of Manga /// Returns Cover of Manga
/// </summary> /// </summary>
/// <param name="id">Manga-ID</param> /// <param name="MangaId">Manga-ID</param>
/// <param name="formatRequest">Formatting/Resizing Request</param> /// <param name="formatRequest">Formatting/Resizing Request</param>
/// <response code="200">JPEG Image</response> /// <response code="200">JPEG Image</response>
/// <response code="204">Cover not loaded</response> /// <response code="204">Cover not loaded</response>
/// <response code="400">The formatting-request was invalid</response> /// <response code="400">The formatting-request was invalid</response>
/// <response code="404">Manga with ID not found</response> /// <response code="404">Manga with ID not found</response>
[HttpPost("{id}/Cover")] [HttpPost("{MangaId}/Cover")]
[ProducesResponseType<byte[]>(Status200OK,"image/jpeg")] [ProducesResponseType<byte[]>(Status200OK,"image/jpeg")]
[ProducesResponseType(Status204NoContent)] [ProducesResponseType(Status204NoContent)]
[ProducesResponseType(Status400BadRequest)] [ProducesResponseType(Status400BadRequest)]
[ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status404NotFound)]
public IActionResult GetCover(string id, [FromBody(EmptyBodyBehavior = EmptyBodyBehavior.Allow)]CoverFormatRequestRecord? formatRequest) public IActionResult GetCover(string MangaId, [FromBody(EmptyBodyBehavior = EmptyBodyBehavior.Allow)]CoverFormatRequestRecord? formatRequest)
{ {
Manga? m = context.Manga.Find(id); Manga? m = context.Manga.Find(MangaId);
if (m is null) if (m is null)
return NotFound(); return NotFound();
if (!System.IO.File.Exists(m.CoverFileNameInCache)) if (!System.IO.File.Exists(m.CoverFileNameInCache))
@ -130,15 +130,15 @@ public class MangaController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Returns all Chapters of Manga /// Returns all Chapters of Manga
/// </summary> /// </summary>
/// <param name="id">Manga-ID</param> /// <param name="MangaId">Manga-ID</param>
/// <response code="200"></response> /// <response code="200"></response>
/// <response code="404">Manga with ID not found</response> /// <response code="404">Manga with ID not found</response>
[HttpGet("{id}/Chapters")] [HttpGet("{MangaId}/Chapters")]
[ProducesResponseType<Chapter[]>(Status200OK, "application/json")] [ProducesResponseType<Chapter[]>(Status200OK, "application/json")]
[ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status404NotFound)]
public IActionResult GetChapters(string id) public IActionResult GetChapters(string MangaId)
{ {
Manga? m = context.Manga.Find(id); Manga? m = context.Manga.Find(MangaId);
if (m is null) if (m is null)
return NotFound(); return NotFound();
@ -149,19 +149,19 @@ public class MangaController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Returns the latest Chapter of requested Manga available on Website /// Returns the latest Chapter of requested Manga available on Website
/// </summary> /// </summary>
/// <param name="id">Manga-ID</param> /// <param name="MangaId">Manga-ID</param>
/// <response code="200"></response> /// <response code="200"></response>
/// <response code="204">No available chapters</response> /// <response code="204">No available chapters</response>
/// <response code="404">Manga with ID not found.</response> /// <response code="404">Manga with ID not found.</response>
/// <response code="500">Could not retrieve the maximum chapter-number</response> /// <response code="500">Could not retrieve the maximum chapter-number</response>
[HttpGet("{id}/Chapter/LatestAvailable")] [HttpGet("{MangaId}/Chapter/LatestAvailable")]
[ProducesResponseType<Chapter>(Status200OK, "application/json")] [ProducesResponseType<Chapter>(Status200OK, "application/json")]
[ProducesResponseType(Status204NoContent)] [ProducesResponseType(Status204NoContent)]
[ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status404NotFound)]
[ProducesResponseType<string>(Status500InternalServerError, "text/plain")] [ProducesResponseType<string>(Status500InternalServerError, "text/plain")]
public IActionResult GetLatestChapter(string id) public IActionResult GetLatestChapter(string MangaId)
{ {
Manga? m = context.Manga.Find(id); Manga? m = context.Manga.Find(MangaId);
if (m is null) if (m is null)
return NotFound(); return NotFound();
@ -179,19 +179,19 @@ public class MangaController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Returns the latest Chapter of requested Manga that is downloaded /// Returns the latest Chapter of requested Manga that is downloaded
/// </summary> /// </summary>
/// <param name="id">Manga-ID</param> /// <param name="MangaId">Manga-ID</param>
/// <response code="200"></response> /// <response code="200"></response>
/// <response code="204">No available chapters</response> /// <response code="204">No available chapters</response>
/// <response code="404">Manga with ID not found.</response> /// <response code="404">Manga with ID not found.</response>
/// <response code="500">Could not retrieve the maximum chapter-number</response> /// <response code="500">Could not retrieve the maximum chapter-number</response>
[HttpGet("{id}/Chapter/LatestDownloaded")] [HttpGet("{MangaId}/Chapter/LatestDownloaded")]
[ProducesResponseType<Chapter>(Status200OK, "application/json")] [ProducesResponseType<Chapter>(Status200OK, "application/json")]
[ProducesResponseType(Status204NoContent)] [ProducesResponseType(Status204NoContent)]
[ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status404NotFound)]
[ProducesResponseType<string>(Status500InternalServerError, "text/plain")] [ProducesResponseType<string>(Status500InternalServerError, "text/plain")]
public IActionResult GetLatestChapterDownloaded(string id) public IActionResult GetLatestChapterDownloaded(string MangaId)
{ {
Manga? m = context.Manga.Find(id); Manga? m = context.Manga.Find(MangaId);
if (m is null) if (m is null)
return NotFound(); return NotFound();
@ -209,15 +209,15 @@ public class MangaController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Configure the cut-off for Manga /// Configure the cut-off for Manga
/// </summary> /// </summary>
/// <param name="id">Manga-ID</param> /// <param name="MangaId">Manga-ID</param>
/// <response code="200"></response> /// <response code="200"></response>
/// <response code="404">Manga with ID not found.</response> /// <response code="404">Manga with ID not found.</response>
[HttpPatch("{id}/IgnoreChaptersBefore")] [HttpPatch("{MangaId}/IgnoreChaptersBefore")]
[ProducesResponseType<float>(Status200OK, "text/plain")] [ProducesResponseType<float>(Status200OK, "text/plain")]
[ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status404NotFound)]
public IActionResult IgnoreChaptersBefore(string id) public IActionResult IgnoreChaptersBefore(string MangaId)
{ {
Manga? m = context.Manga.Find(id); Manga? m = context.Manga.Find(MangaId);
if (m is null) if (m is null)
return NotFound(); return NotFound();
return Ok(m.IgnoreChapterBefore); return Ok(m.IgnoreChapterBefore);
@ -226,11 +226,11 @@ public class MangaController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Move the Directory the .cbz-files are located in /// Move the Directory the .cbz-files are located in
/// </summary> /// </summary>
/// <param name="id">Manga-ID</param> /// <param name="MangaId">Manga-ID</param>
/// <param name="folder">New Directory-Path</param> /// <param name="folder">New Directory-Path</param>
/// <remarks>NOT IMPLEMENTED</remarks> /// <remarks>NOT IMPLEMENTED</remarks>
[HttpPost("{id}/MoveFolder")] [HttpPost("{MangaId}/MoveFolder")]
public IActionResult MoveFolder(string id, [FromBody]string folder) public IActionResult MoveFolder(string MangaId, [FromBody]string folder)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

@ -29,15 +29,15 @@ public class NotificationConnectorController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Returns Notification-Connector with requested ID /// Returns Notification-Connector with requested ID
/// </summary> /// </summary>
/// <param name="id">Notification-Connector-ID</param> /// <param name="NotificationConnectorId">Notification-Connector-ID</param>
/// <response code="200"></response> /// <response code="200"></response>
/// <response code="404">NotificationConnector with ID not found</response> /// <response code="404">NotificationConnector with ID not found</response>
[HttpGet("{id}")] [HttpGet("{NotificationConnectorId}")]
[ProducesResponseType<NotificationConnector>(Status200OK, "application/json")] [ProducesResponseType<NotificationConnector>(Status200OK, "application/json")]
[ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status404NotFound)]
public IActionResult GetConnector(string id) public IActionResult GetConnector(string NotificationConnectorId)
{ {
NotificationConnector? ret = context.NotificationConnectors.Find(id); NotificationConnector? ret = context.NotificationConnectors.Find(NotificationConnectorId);
return (ret is not null) switch return (ret is not null) switch
{ {
true => Ok(ret), true => Ok(ret),
@ -161,19 +161,19 @@ public class NotificationConnectorController(PgsqlContext context) : Controller
/// <summary> /// <summary>
/// Deletes the Notification-Connector with the requested ID /// Deletes the Notification-Connector with the requested ID
/// </summary> /// </summary>
/// <param name="id">Notification-Connector-ID</param> /// <param name="NotificationConnectorId">Notification-Connector-ID</param>
/// <response code="200"></response> /// <response code="200"></response>
/// <response code="404">NotificationConnector with ID not found</response> /// <response code="404">NotificationConnector with ID not found</response>
/// <response code="500">Error during Database Operation</response> /// <response code="500">Error during Database Operation</response>
[HttpDelete("{id}")] [HttpDelete("{NotificationConnectorId}")]
[ProducesResponseType(Status200OK)] [ProducesResponseType(Status200OK)]
[ProducesResponseType(Status404NotFound)] [ProducesResponseType(Status404NotFound)]
[ProducesResponseType<string>(Status500InternalServerError, "text/plain")] [ProducesResponseType<string>(Status500InternalServerError, "text/plain")]
public IActionResult DeleteConnector(string id) public IActionResult DeleteConnector(string NotificationConnectorId)
{ {
try try
{ {
NotificationConnector? ret = context.NotificationConnectors.Find(id); NotificationConnector? ret = context.NotificationConnectors.Find(NotificationConnectorId);
if(ret is null) if(ret is null)
return NotFound(); return NotFound();