diff options
| author | Adam Soltys <[email protected]> | 2024-08-24 00:13:25 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-08-24 00:13:25 -0700 |
| commit | e6faccc20630c4d1c0838872dd82cd8e8d1f2c01 (patch) | |
| tree | 94fe995a3d4da481546907ab0bac0973ed671326 /src | |
| parent | 243f2b2f0f2da9735885978a6773b77a7bd139eb (diff) | |
| download | coinos-ui-e6faccc20630c4d1c0838872dd82cd8e8d1f2c01.tar.gz coinos-ui-e6faccc20630c4d1c0838872dd82cd8e8d1f2c01.zip | |
prompt for registration on redemption
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/(app)/ecash/[id]/+page.server.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/routes/(app)/ecash/[id]/+page.server.js b/src/routes/(app)/ecash/[id]/+page.server.js index 15511174..624ac314 100644 --- a/src/routes/(app)/ecash/[id]/+page.server.js +++ b/src/routes/(app)/ecash/[id]/+page.server.js @@ -2,7 +2,10 @@ import { fail, redirect } from "@sveltejs/kit"; import { auth, fd, post } from "$lib/utils"; export const actions = { - default: async ({ cookies, request }) => { + default: async ({ cookies, request, url }) => { + if (!cookies.get("username")) + redirect(307, `/register?redirect=${url.pathname}`); + let { token } = await fd(request); let claimed; try { |
