After successfully adding workout and confirming prompt user is redirected back to overview page
This commit is contained in:
@@ -118,7 +118,7 @@
|
||||
},
|
||||
body: JSON.stringify({ workout: workout }),
|
||||
}).then(res => res.json())
|
||||
.then(res => swal("Submitted", JSON.stringify(res), "success"))
|
||||
.then(res => swal("Submitted", JSON.stringify(res), "success").then(isConfirm => window.location.href = '/'))
|
||||
.catch(err => swal("Failed to submit workout", err.message, "error"));
|
||||
|
||||
workout = [];
|
||||
|
||||
Reference in New Issue
Block a user