[postgres-Server-V2] Use MangaId to check if manga exists instead of connector id

This commit is contained in:
Alessandro Benetton 2025-02-01 21:53:16 +01:00
parent 6bbd09072b
commit bd9e79d026
No known key found for this signature in database
GPG Key ID: ED63A304CE2C0303

View File

@ -1,4 +1,4 @@
using API.Schema;
using API.Schema;
using API.Schema.MangaConnectors;
using Asp.Versioning;
using Microsoft.AspNetCore.Mvc;
@ -82,8 +82,9 @@ public class SearchController(PgsqlContext context) : Controller
{
if (manga is null)
return null;
Manga? existing = context.Manga.FirstOrDefault(m =>
m.MangaConnector == manga.MangaConnector && m.ConnectorId == manga.ConnectorId);
m.MangaId == manga.MangaId);
if (tags is not null)
{