refactor: remove HonoRequest from updateWatchStatus
This commit is contained in:
@@ -84,7 +84,7 @@ app.openapi(route, async (c) => {
|
|||||||
isComplete,
|
isComplete,
|
||||||
);
|
);
|
||||||
if (isComplete) {
|
if (isComplete) {
|
||||||
await updateWatchStatus(c.req, deviceId, aniListId, "COMPLETED");
|
await updateWatchStatus(deviceId, aniListId, "COMPLETED");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!user) {
|
if (!user) {
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ const route = createRoute({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export async function updateWatchStatus(
|
export async function updateWatchStatus(
|
||||||
req: HonoRequest,
|
|
||||||
deviceId: string,
|
deviceId: string,
|
||||||
titleId: number,
|
titleId: number,
|
||||||
watchStatus: WatchStatus | null,
|
watchStatus: WatchStatus | null,
|
||||||
@@ -99,7 +98,7 @@ app.openapi(route, async (c) => {
|
|||||||
|
|
||||||
if (!isRetrying) {
|
if (!isRetrying) {
|
||||||
try {
|
try {
|
||||||
await updateWatchStatus(c.req, deviceId, titleId, watchStatus);
|
await updateWatchStatus(deviceId, titleId, watchStatus);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error setting watch status");
|
console.error("Error setting watch status");
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|||||||
Reference in New Issue
Block a user