chore: remove no longer needed isRetrying boolean

This commit is contained in:
2025-12-18 08:49:50 -05:00
parent 3294d3c6a2
commit 1958110679

View File

@@ -22,7 +22,6 @@ const UpdateWatchStatusRequest = z.object({
deviceId: z.string(), deviceId: z.string(),
watchStatus: WatchStatus.nullable(), watchStatus: WatchStatus.nullable(),
titleId: AniListIdSchema, titleId: AniListIdSchema,
isRetrying: z.boolean().optional().default(false),
}); });
const route = createRoute({ const route = createRoute({
@@ -81,12 +80,8 @@ export async function updateWatchStatus(
} }
app.openapi(route, async (c) => { app.openapi(route, async (c) => {
const { const { deviceId, watchStatus, titleId } =
deviceId, await c.req.json<typeof UpdateWatchStatusRequest._type>();
watchStatus,
titleId,
isRetrying = false,
} = await c.req.json<typeof UpdateWatchStatusRequest._type>();
// Check if we should use mock data // Check if we should use mock data
const { useMockData } = await import("~/libs/useMockData"); const { useMockData } = await import("~/libs/useMockData");
if (useMockData()) { if (useMockData()) {
@@ -94,7 +89,6 @@ app.openapi(route, async (c) => {
return c.json(SuccessResponse, { status: 200 }); return c.json(SuccessResponse, { status: 200 });
} }
if (!isRetrying) {
try { try {
await updateWatchStatus(deviceId, titleId, watchStatus); await updateWatchStatus(deviceId, titleId, watchStatus);
} catch (error) { } catch (error) {
@@ -102,7 +96,6 @@ app.openapi(route, async (c) => {
console.error(error); console.error(error);
return c.json(ErrorResponse, { status: 500 }); return c.json(ErrorResponse, { status: 500 });
} }
}
const aniListToken = c.req.header("X-AniList-Token"); const aniListToken = c.req.header("X-AniList-Token");
if (aniListToken) { if (aniListToken) {