fix: OpenAPI schema not correct for "update watch status"
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user