After successfully adding workout and confirming prompt user is redirected back to overview page

This commit is contained in:
Peter Stockings
2023-03-10 22:54:44 +11:00
parent 2c3fefdb89
commit 1a1417920a
2 changed files with 2 additions and 2 deletions

View File

@@ -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 = [];