[Vuejs]-Axios Post with foreign key of int

0👍

The body of your axios payload:

                {
                        subject: ticket.subject,
                        issue: ticket.issue,
                        company: ticket.company,
                        date: datetime,
                        user: JSON.parse(localStorage.getItem('user'))["user"],
                }

Has the prop names subject, issue, company, date, user
These do not directly match the prop names you have in your ticket entity
For example (name = "tickets_id")

I would suggest using Postman to test your axios POST before you write it in vuejs. Run your tickets API and get the correct prop names and headers for your POST before putting it into vuejs and axios.

Leave a comment