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
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...