fix: OpenAPI schema not correct for "update watch status"

This commit is contained in:
2024-07-04 18:15:40 -04:00
parent 2becf1aa3b
commit a1f0a2001d

View File

@@ -6,7 +6,9 @@ import type { Env } from "~/types/env";
import { import {
AniListIdSchema, AniListIdSchema,
ErrorResponse, ErrorResponse,
ErrorResponseSchema,
SuccessResponse, SuccessResponse,
SuccessResponseSchema,
} from "~/types/schema"; } from "~/types/schema";
import { WatchStatus } from "~/types/title/watchStatus"; import { WatchStatus } from "~/types/title/watchStatus";
@@ -43,7 +45,7 @@ const route = createRoute({
200: { 200: {
content: { content: {
"application/json": { "application/json": {
schema: z.boolean(), schema: SuccessResponseSchema(),
}, },
}, },
description: "Watch status was successfully updated", description: "Watch status was successfully updated",
@@ -51,7 +53,7 @@ const route = createRoute({
500: { 500: {
content: { content: {
"application/json": { "application/json": {
schema: z.boolean(), schema: ErrorResponseSchema,
}, },
}, },
description: "Failed to update watch status", description: "Failed to update watch status",