Untitled
unknown
plain_text
2 years ago
613 B
5
Indexable
export const updateDifficulties = createAsyncThunk(
'trainingSession/updateDifficulties',
async ({ deckId, updatedDifficulties }) => {
const userId = localStorage.getItem('id');
if (userId) {
const response = await axios.patch(
`${import.meta.env.VITE_API_URL}/account/${userId}/decks/${deckId}/cards/update-difficulties`,
updatedDifficulties,
{
headers: {
authorization: localStorage.getItem('accessToken'),
},
}
);
return response.data;
} else {
console.log('updatedCard is null or undefined');
}
}
);Editor is loading...
Leave a Comment