useEffect(() => {
const fetchData = async () => {
try {
const userToken =JSON.parse( localStorage.getItem("cookieFallback"));
const token=userToken[a_session_${process.env.REACT_APP_PROJECT_ID}]
console.log(token)
const config = {
headers: {
Authorization: Bearer ${token}
}
};
const response = await axios.post('http://localhost:3001/dashborddata/',null,config);
console.log(response.data);
} catch (error) {
console.log(error.message);
}
};
fetchData();
}, []);
Recommended threads
- Type 'Theme' does not satisfy the constr...
Type 'Theme' does not satisfy the constraint 'Row'. Type 'Theme' is missing the following properties from type 'Row': $id, $sequence, $tableId, $databaseId, a...
- Custom Domain TLS Error (perfinso.com)
Hey Appwrite team/community, I need urgent help with a custom domain setup! I've added perfinso.com to my project, pointed the nameservers, and verification is...
- User unable to delete document they crea...
I am having a bit a database issue. I am making a music review website and I have successfully been able to create and update reviews as a dummy user, but no ma...