diff --git a/src/App.tsx b/src/App.tsx index 240f415..e25701c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -288,7 +288,7 @@ function AppReady() { { const { enqueueSnackbar } = useSnackbar(); const handleMarking = async () => { + let result = null; if (!isPlayed) { - return await getPlaystateApi(api).markPlayedItem({ + result = await getPlaystateApi(api).markPlayedItem({ userId: userId, itemId: itemId, }); } else if (isPlayed) { - return await getPlaystateApi(api).markUnplayedItem({ + result = await getPlaystateApi(api).markUnplayedItem({ userId: userId, itemId: itemId, }); } + return result; }; const mutation = useMutation({ mutationFn: handleMarking,