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