mirror of
https://github.com/C9Glax/tranga.git
synced 2025-02-22 23:30:13 +01:00
[postgres-Server-V2] Use MangaId to check if manga exists instead of connector id
This commit is contained in:
parent
6bbd09072b
commit
bd9e79d026
@ -1,4 +1,4 @@
|
|||||||
using API.Schema;
|
using API.Schema;
|
||||||
using API.Schema.MangaConnectors;
|
using API.Schema.MangaConnectors;
|
||||||
using Asp.Versioning;
|
using Asp.Versioning;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
@ -82,8 +82,9 @@ public class SearchController(PgsqlContext context) : Controller
|
|||||||
{
|
{
|
||||||
if (manga is null)
|
if (manga is null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
Manga? existing = context.Manga.FirstOrDefault(m =>
|
Manga? existing = context.Manga.FirstOrDefault(m =>
|
||||||
m.MangaConnector == manga.MangaConnector && m.ConnectorId == manga.ConnectorId);
|
m.MangaId == manga.MangaId);
|
||||||
|
|
||||||
if (tags is not null)
|
if (tags is not null)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user