diff --git a/src/controllers/auth/anilist/index.ts b/src/controllers/auth/anilist/index.ts index a6cb83c..e3bd194 100644 --- a/src/controllers/auth/anilist/index.ts +++ b/src/controllers/auth/anilist/index.ts @@ -127,7 +127,7 @@ app.openapi(route, async (c) => { return streamSSE( c, async (stream) => { - stream.writeSSE({ event: "user", data: JSON.stringify(user) }); + await stream.writeSSE({ event: "user", data: JSON.stringify(user) }); let currentPage = 1; let hasNextPage = true; @@ -143,7 +143,7 @@ app.openapi(route, async (c) => { } if (!(pageInfo?.hasNextPage ?? false) && (pageInfo?.total ?? 0) > 0) { - stream.writeSSE({ + await stream.writeSSE({ event: "count", data: pageInfo!.total.toString(), }); @@ -196,7 +196,7 @@ app.openapi(route, async (c) => { return; } - stream.writeSSE({ + return stream.writeSSE({ event: "title", data: JSON.stringify({ title: media, episodes }), id: media.id.toString(), diff --git a/src/controllers/episodes/getByAniListId/aniwatch.ts b/src/controllers/episodes/getByAniListId/aniwatch.ts index 6dd39b6..348cf66 100644 --- a/src/controllers/episodes/getByAniListId/aniwatch.ts +++ b/src/controllers/episodes/getByAniListId/aniwatch.ts @@ -142,7 +142,6 @@ function getAniwatchId( data: AniwatchSearchResponse; }; const currentValue = await current; - console.log(currentValue); return { success: currentValue.success || json.success, data: {