Closed anaismveras closed 2 years ago
MERN
i can not put items into the database from the API
const [likedDestinations, setLikedDestinations] = [{ city: '', state: '', country: '', lgbtRating: '', image_url: '', description: '', owner: '', business: [], reviews: [], roadGoatId: '' }] const addToGaycation = () => { axios.post(`http://localhost:8000/destinations`, { city: destinationsData.attributes.short_name }) }
no error
i may not be sure hoe to connect the button to the api call
im just trying to get the name of the city in the database
What stack are you using?
(ex: MERN(mongoose + react), DR(django + react), PEN, etc.)
MERN
What's the problem you're trying to solve?
i can not put items into the database from the API
Post any code you think might be relevant (one fenced block per file)
If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?
no error
What is your best guess as to the source of the problem?
i may not be sure hoe to connect the button to the api call
What things have you already tried to solve the problem?
im just trying to get the name of the city in the database