diff options
| author | Adam Soltys <[email protected]> | 2022-08-16 15:31:41 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-08-16 15:31:41 -0700 |
| commit | 770725fbdcc8ea7bf47ef0af5a43a239bef98ff6 (patch) | |
| tree | 445d55b896a63eab5a29204e720a9e74d0629697 /src/routes/login.js | |
| parent | 0b51e1dfd0d099c243d21889fb77fea4769dac0a (diff) | |
| download | coinos-ui-770725fbdcc8ea7bf47ef0af5a43a239bef98ff6.tar.gz coinos-ui-770725fbdcc8ea7bf47ef0af5a43a239bef98ff6.zip | |
sveltekit route migration
Diffstat (limited to 'src/routes/login.js')
| -rw-r--r-- | src/routes/login.js | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/routes/login.js b/src/routes/login.js deleted file mode 100644 index db1fbb6c..00000000 --- a/src/routes/login.js +++ /dev/null @@ -1,24 +0,0 @@ -import { post } from '$lib/utils'; -import cookie from 'cookie'; - -let maxAge = 30 * 24 * 60 * 60; - -export async function POST({ request }) { - let body = await post('/login', await request.json()); - - let expires = new Date(); - expires.setSeconds(expires.getSeconds() + maxAge); - - return { - body, - headers: { - 'set-cookie': cookie.serialize('token', body.token, { - httpOnly: true, - maxAge, - sameSite: 'lax', - path: '/', - expires - }) - } - }; -} |
