Skip to content
Snippets Groups Projects
Commit f2bea68f authored by henrikburmann's avatar henrikburmann
Browse files

Fixed 401 error

parent 58fea0f3
No related branches found
No related tags found
1 merge request!123Delete listing
Pipeline #181360 passed
......@@ -273,7 +273,7 @@ export default {
},
async deleteItem() {
await UserService.setListingToDeleted(this.chosenItem);
// this.$router.go(0);
this.$router.go(0);
},
searchWritten: function () {
//This method triggers when search input field is changed
......
......@@ -29,8 +29,8 @@ class UserService {
async setListingToDeleted(listingId) {
console.log(tokenHeader());
return await axios
.put(API_URL + "listing/" + listingId, {
headers: {Authorization: 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmaX…5vIn0.4GOdg2HsKb5ubJjkO674gQRO4C0RSIsHa4X-MI2ftHg'},
.put(API_URL + "listing/" + listingId, null, {
headers: tokenHeader()
})
.then((res) => {
return res.data;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment