commit e9bf6cbe79d305e689f91a255c78fb2a40895c2c parent 20d94a05733b617b71567cac34beb6fedb509c98 Author: Jacob R. Edwards <jacob@jacobedwards.org> Date: Fri, 11 Oct 2024 12:48:48 -0700 Redirect to settings if already payed Diffstat:
| M | files/settings/verify-email/main.js | | | 14 | ++++++++++++-- |
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/files/settings/verify-email/main.js b/files/settings/verify-email/main.js @@ -54,8 +54,18 @@ function codeForm() { if (!body.valid) { etc.error("That was not the correct code, please try again.", form) } else { - // redirect somewhere better - window.location.href = "/services" + etc.userService() + .then(function(service) { + if (service) { + window.location.href = "/settings" + } else { + window.location.href = "/services" + } + }) + .catch(function() { + // Eh. + window.location.href = "/settings" + }) } }) .catch(function(err) {