Fix iscompleted check

This commit is contained in:
austinkelsay 2024-10-05 17:39:56 -05:00
parent 6fe2b8904a
commit 09182d4a92
2 changed files with 1 additions and 5 deletions

View File

@ -17,9 +17,7 @@ const useCheckCourseProgress = () => {
try {
const response = await axios.get(`/api/users/${userId}/courses/${courseId}`);
console.log("RESPONSE", response.data);
const isCompleted = response.data.completed;
console.log("IS COMPLETED", isCompleted);
const isCompleted = response.data === true;
if (isCompleted && !userCourse.completed) {
await axios.put(`/api/users/${userId}/courses/${courseId}`, {

View File

@ -43,8 +43,6 @@ const authorize = async (pubkey) => {
// add the kind0 fields to the user
const combinedUser = { ...dbUser, kind0: fields };
console.log("COMBINED USER", combinedUser);
return combinedUser;
} else {
// Create user