From bd9e79d026292036cbab8f752d9b30c14500c695 Mon Sep 17 00:00:00 2001 From: Alessandro Benetton Date: Sat, 1 Feb 2025 21:53:16 +0100 Subject: [PATCH] [postgres-Server-V2] Use MangaId to check if manga exists instead of connector id --- API/Controllers/SearchController.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/API/Controllers/SearchController.cs b/API/Controllers/SearchController.cs index 3b92bf0..3c45c8d 100644 --- a/API/Controllers/SearchController.cs +++ b/API/Controllers/SearchController.cs @@ -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) {