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 | 1fcdf5077b48fb82e0f3ee4f62d4cf8f73d6ffa1 (patch) | |
| tree | 94fe995a3d4da481546907ab0bac0973ed671326 /src | |
| parent | c28ff4253c04209c4542f87adc0273736e44dda3 (diff) | |
| download | coinos-ui-1fcdf5077b48fb82e0f3ee4f62d4cf8f73d6ffa1.tar.gz coinos-ui-1fcdf5077b48fb82e0f3ee4f62d4cf8f73d6ffa1.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 { |
