Request new wine response includes success bool.
Displays alert instead of modal if not true.
This commit is contained in:
@@ -83,7 +83,13 @@ export default {
|
|||||||
},
|
},
|
||||||
request(wine){
|
request(wine){
|
||||||
requestNewWine(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){
|
emitFromModalButton(action){
|
||||||
if(action == "stay"){
|
if(action == "stay"){
|
||||||
|
|||||||
Reference in New Issue
Block a user