Commit b0a2e37b authored by Khalid Ali's avatar Khalid Ali
Browse files

Add form parameters to post

parent 543d64a1
......@@ -196,7 +196,13 @@ export default class CreateListing extends Vue {
// API.get('bs/api/listing')
API.post('bs/api/listing', { //?ticket=' + localStorage.getItem('token'), {
firstName: "Khalid",
isbn: this.form.isbn,
course: this.form.course,
condition: this.form.condition,
accessCode: this.form.accessCode,
price: this.form.price,
description: this.form.description,
photo: this.form.photo,
},
{
headers: {
......@@ -215,7 +221,7 @@ export default class CreateListing extends Vue {
console.log(error.response);
// console.log("hello");
if (error.response == undefined || error.response.status == 403) {
location.replace('https://localhost:9090/bs/api/listing');
location.replace('https://localhost:9090/bs/api/login');
// this.login();
}
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment