Skip to content

Commit

Permalink
change respons
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelshoham committed Dec 25, 2023
1 parent 7992ad5 commit 26a7922
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/pages/Porjects/components/listProjects.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ try {
'Content-Type': 'application/json; charset=utf-8',
}
})
console.log(response)
console.log('user id:', response.data.data.result[0]._id);
userID = response.data.data.result[0]._id;}
// console.log(response)
// console.log('user id:', response.data.result[0]._id);
userID = response.data.result[0]._id;}
catch(error) {
console.error('error: ', error.message);
};
Expand All @@ -56,6 +56,7 @@ export default function ListProject() {
axios.get(UrlDataBoard, { headers })
.then(response => {
setProjectsList(response.data)
// console.log("Mendy", response.data)

})
.catch(error => {
Expand Down
7 changes: 4 additions & 3 deletions src/pages/create-project/components/createProject.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import { Project } from "../../Porjects/components/Project";
import axios from "axios";

const UrlDataBoard = `${api}/board/create`;

const headers = {
'Authorization': 'Happy',
'Content-Type': 'application/json; charset=utf-8'
};
const token = localStorage.getItem("authToken");
console.log("token: " + token)
// console.log("token: " + token)

let userID = '';

Expand All @@ -27,15 +28,15 @@ try {
}
})
// console.log('user id:', response.data.result[0]._id);
userID = response.data.data.result[0]._id;}
userID = response.data.result[0]._id;}
catch(error) {
console.error('error: ', error.message);
};

export default function CreateProject() {

const { id } = useParams();
console.log(id);
// console.log(id);

const [isSaved, setSaved] = useState(false)

Expand Down

1 comment on commit 26a7922

@michaelshoham
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Please sign in to comment.