Request new wine response includes success bool.

Displays alert instead of modal if not true.
This commit is contained in:
2021-01-11 20:54:48 +01:00
parent 4043954f95
commit ca6f6cb2ba

View File

@@ -83,7 +83,13 @@ export default {
},
request(wine){
requestNewWine(wine)
.then(() => this.showModal = true)
.then(resp => {
if(resp.success) {
this.showModal = true
} else {
alert("Obs, her oppsto det en feil! Feilen er logget.");
}
})
},
emitFromModalButton(action){
if(action == "stay"){