From fcac650322d5374ffb65e91481d7bfe7157c5082 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sat, 19 Jul 2025 15:53:07 +0200 Subject: [PATCH] Fix swagger's href --- api/src/controllers/images.ts | 2 +- api/src/controllers/profiles/nextup.ts | 4 ++-- api/src/controllers/shows/collections.ts | 2 +- api/src/controllers/shows/logic.ts | 8 ++++++-- api/src/controllers/shows/movies.ts | 2 +- api/src/controllers/shows/series.ts | 2 +- api/src/controllers/staff.ts | 2 +- api/src/controllers/studios.ts | 2 +- api/src/controllers/videos.ts | 9 +-------- 9 files changed, 15 insertions(+), 18 deletions(-) diff --git a/api/src/controllers/images.ts b/api/src/controllers/images.ts index 07c54e10..2f690be9 100644 --- a/api/src/controllers/images.ts +++ b/api/src/controllers/images.ts @@ -166,7 +166,7 @@ export const imagesH = new Elysia({ tags: ["images"] }) response: { 302: t.Void({ description: - "Redirected to the [/images/{id}](#tag/images/GET/images/{id}) route.", + "Redirected to the [/images/{id}](#tag/images/get/api/images/{id}) route.", }), 404: { ...KError, diff --git a/api/src/controllers/profiles/nextup.ts b/api/src/controllers/profiles/nextup.ts index bbf64686..d305fac4 100644 --- a/api/src/controllers/profiles/nextup.ts +++ b/api/src/controllers/profiles/nextup.ts @@ -2,9 +2,9 @@ import { and, eq, sql } from "drizzle-orm"; import Elysia, { t } from "elysia"; import { auth } from "~/auth"; import { db } from "~/db"; -import { entries, entryTranslations } from "~/db/schema"; +import { entries } from "~/db/schema"; import { watchlist } from "~/db/schema/watchlist"; -import { getColumns, sqlarr } from "~/db/utils"; +import { getColumns } from "~/db/utils"; import { Entry } from "~/models/entry"; import { AcceptLanguage, diff --git a/api/src/controllers/shows/collections.ts b/api/src/controllers/shows/collections.ts index 34ddf4fd..b53cbe4e 100644 --- a/api/src/controllers/shows/collections.ts +++ b/api/src/controllers/shows/collections.ts @@ -130,7 +130,7 @@ export const collections = new Elysia({ response: { 302: t.Void({ description: - "Redirected to the [/collections/{id}](#tag/collections/GET/collections/{id}) route.", + "Redirected to the [/collections/{id}](#tag/collections/get/api/collections/{id}) route.", }), 404: { ...KError, diff --git a/api/src/controllers/shows/logic.ts b/api/src/controllers/shows/logic.ts index e2a498bb..51d4b985 100644 --- a/api/src/controllers/shows/logic.ts +++ b/api/src/controllers/shows/logic.ts @@ -2,7 +2,6 @@ import { and, eq, exists, ne, type SQL, sql } from "drizzle-orm"; import { db } from "~/db"; import { entries, - entryTranslations, entryVideoJoin, profiles, showStudioJoin, @@ -36,7 +35,12 @@ import { } from "~/models/utils"; import type { EmbeddedVideo } from "~/models/video"; import { WatchlistStatus } from "~/models/watchlist"; -import { entryProgressQ, entryVideosQ, getEntryTransQ, mapProgress } from "../entries"; +import { + entryProgressQ, + entryVideosQ, + getEntryTransQ, + mapProgress, +} from "../entries"; export const watchStatusQ = db .select({ diff --git a/api/src/controllers/shows/movies.ts b/api/src/controllers/shows/movies.ts index 9f619b34..e47c7bd5 100644 --- a/api/src/controllers/shows/movies.ts +++ b/api/src/controllers/shows/movies.ts @@ -120,7 +120,7 @@ export const movies = new Elysia({ prefix: "/movies", tags: ["movies"] }) response: { 302: t.Void({ description: - "Redirected to the [/movies/{id}](#tag/movies/GET/movies/{id}) route.", + "Redirected to the [/movies/{id}](#tag/movies/get/api/movies/{id}) route.", }), 404: { ...KError, diff --git a/api/src/controllers/shows/series.ts b/api/src/controllers/shows/series.ts index 52b6de52..853d13b3 100644 --- a/api/src/controllers/shows/series.ts +++ b/api/src/controllers/shows/series.ts @@ -123,7 +123,7 @@ export const series = new Elysia({ prefix: "/series", tags: ["series"] }) response: { 302: t.Void({ description: - "Redirected to the [/series/{id}](#tag/series/GET/series/{id}) route.", + "Redirected to the [/series/{id}](#tag/series/get/api/series/{id}) route.", }), 404: { ...KError, diff --git a/api/src/controllers/staff.ts b/api/src/controllers/staff.ts index a094249e..699e45b2 100644 --- a/api/src/controllers/staff.ts +++ b/api/src/controllers/staff.ts @@ -175,7 +175,7 @@ export const staffH = new Elysia({ tags: ["staff"] }) response: { 302: t.Void({ description: - "Redirected to the [/staff/{id}](#tag/staff/GET/staff/{id}) route.", + "Redirected to the [/staff/{id}](#tag/staff/get/api/staff/{id}) route.", }), 404: { ...KError, diff --git a/api/src/controllers/studios.ts b/api/src/controllers/studios.ts index 65841ede..81097886 100644 --- a/api/src/controllers/studios.ts +++ b/api/src/controllers/studios.ts @@ -215,7 +215,7 @@ export const studiosH = new Elysia({ prefix: "/studios", tags: ["studios"] }) response: { 302: t.Void({ description: - "Redirected to the [/studios/{id}](#tag/studios/GET/studios/{id}) route.", + "Redirected to the [/studios/{id}](#tag/studios/get/api/studios/{id}) route.", }), 404: { ...KError, diff --git a/api/src/controllers/videos.ts b/api/src/controllers/videos.ts index 6e869b55..dacdc9e0 100644 --- a/api/src/controllers/videos.ts +++ b/api/src/controllers/videos.ts @@ -9,20 +9,13 @@ import { min, notExists, or, - type SQL, sql, } from "drizzle-orm"; import { alias } from "drizzle-orm/pg-core"; import { Elysia, t } from "elysia"; import { auth } from "~/auth"; import { db, type Transaction } from "~/db"; -import { - entries, - entryTranslations, - entryVideoJoin, - shows, - videos, -} from "~/db/schema"; +import { entries, entryVideoJoin, shows, videos } from "~/db/schema"; import { coalesce, conflictUpdateAllExcept,