WDI-SEA / project-4-issues

Open an issue to receive help on project 4 issues
0 stars 0 forks source link

trying to put info into the db #44

Closed anaismveras closed 2 years ago

anaismveras commented 2 years ago

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)

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
        })
    }

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