mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-04-19 19:01:19 +00:00
fix request to check completed
This commit is contained in:
parent
09182d4a92
commit
3abacba428
@ -20,7 +20,7 @@ const useCheckCourseProgress = () => {
|
||||
const isCompleted = response.data === true;
|
||||
|
||||
if (isCompleted && !userCourse.completed) {
|
||||
await axios.put(`/api/users/${userId}/courses/${courseId}`, {
|
||||
await axios.post(`/api/users/${userId}/courses/${courseId}`, {
|
||||
completed: true,
|
||||
completedAt: new Date().toISOString(),
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user