mirror of
https://github.com/C9Glax/tranga.git
synced 2025-04-13 03:43:17 +02:00
Fix Weebcentral
This commit is contained in:
parent
b955d41530
commit
dbbac1ad59
@ -3,6 +3,7 @@ using API.Schema.Jobs;
|
|||||||
using API.Schema.MangaConnectors;
|
using API.Schema.MangaConnectors;
|
||||||
using Asp.Versioning;
|
using Asp.Versioning;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
using static Microsoft.AspNetCore.Http.StatusCodes;
|
using static Microsoft.AspNetCore.Http.StatusCodes;
|
||||||
|
|
||||||
namespace API.Controllers;
|
namespace API.Controllers;
|
||||||
@ -37,7 +38,7 @@ public class SearchController(PgsqlContext context) : Controller
|
|||||||
if(add is not null)
|
if(add is not null)
|
||||||
retMangas.Add(add);
|
retMangas.Add(add);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (DbUpdateException e)
|
||||||
{
|
{
|
||||||
return StatusCode(500, e);
|
return StatusCode(500, e);
|
||||||
}
|
}
|
||||||
@ -77,7 +78,7 @@ public class SearchController(PgsqlContext context) : Controller
|
|||||||
if(add is not null)
|
if(add is not null)
|
||||||
retMangas.Add(add);
|
retMangas.Add(add);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (DbUpdateException e)
|
||||||
{
|
{
|
||||||
return StatusCode(500, e.Message);
|
return StatusCode(500, e.Message);
|
||||||
}
|
}
|
||||||
@ -119,7 +120,7 @@ public class SearchController(PgsqlContext context) : Controller
|
|||||||
return Ok(add);
|
return Ok(add);
|
||||||
return StatusCode(500);
|
return StatusCode(500);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (DbUpdateException e)
|
||||||
{
|
{
|
||||||
return StatusCode(500, e.Message);
|
return StatusCode(500, e.Message);
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,6 @@ public class Manga
|
|||||||
[Required]
|
[Required]
|
||||||
public uint Year { get; internal set; }
|
public uint Year { get; internal set; }
|
||||||
[StringLength(8)]
|
[StringLength(8)]
|
||||||
[Required]
|
|
||||||
public string? OriginalLanguage { get; internal set; }
|
public string? OriginalLanguage { get; internal set; }
|
||||||
[Required]
|
[Required]
|
||||||
public MangaReleaseStatus ReleaseStatus { get; internal set; }
|
public MangaReleaseStatus ReleaseStatus { get; internal set; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user