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 { ...@@ -273,7 +273,7 @@ export default {
}, },
async deleteItem() { async deleteItem() {
await UserService.setListingToDeleted(this.chosenItem); await UserService.setListingToDeleted(this.chosenItem);
// this.$router.go(0); this.$router.go(0);
}, },
searchWritten: function () { searchWritten: function () {
//This method triggers when search input field is changed //This method triggers when search input field is changed
......
...@@ -29,8 +29,8 @@ class UserService { ...@@ -29,8 +29,8 @@ class UserService {
async setListingToDeleted(listingId) { async setListingToDeleted(listingId) {
console.log(tokenHeader()); console.log(tokenHeader());
return await axios return await axios
.put(API_URL + "listing/" + listingId, { .put(API_URL + "listing/" + listingId, null, {
headers: {Authorization: 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmaX…5vIn0.4GOdg2HsKb5ubJjkO674gQRO4C0RSIsHa4X-MI2ftHg'}, headers: tokenHeader()
}) })
.then((res) => { .then((res) => {
return res.data; 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