Refac APIClient to return data, error and status as object

This commit is contained in:
MerlinScheurer
2025-03-20 20:30:08 +01:00
parent 52083e6fb7
commit edcede5de6
67 changed files with 660 additions and 544 deletions

View File

@@ -46,7 +46,12 @@ async function castVideoProgress(
currentProgress: currentTime,
});
if (videoProgressResponse.watched && video.player.watched !== videoProgressResponse.watched) {
const { data: videoProgressResponseData } = videoProgressResponse ?? {};
if (
videoProgressResponseData?.watched &&
video.player.watched !== videoProgressResponseData.watched
) {
onWatchStateChanged?.(true);
}
}