diff options
| author | Adam Soltys <[email protected]> | 2024-10-19 21:55:05 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-10-19 21:55:05 -0700 |
| commit | 8c750940246d492ea5eab4a80ee7336c4c53ec65 (patch) | |
| tree | 67df287630d6e76484be526522038022a1ccf546 /src/routes/(app)/subscription | |
| parent | 220526a129a18e65fcc28889d489fb37073b099f (diff) | |
| download | coinos-ui-8c750940246d492ea5eab4a80ee7336c4c53ec65.tar.gz coinos-ui-8c750940246d492ea5eab4a80ee7336c4c53ec65.zip | |
push notifications
Diffstat (limited to 'src/routes/(app)/subscription')
| -rw-r--r-- | src/routes/(app)/subscription/+server.ts | 7 | ||||
| -rw-r--r-- | src/routes/(app)/subscription/delete/+server.ts | 8 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/routes/(app)/subscription/+server.ts b/src/routes/(app)/subscription/+server.ts index 8ae3f965..47dfc770 100644 --- a/src/routes/(app)/subscription/+server.ts +++ b/src/routes/(app)/subscription/+server.ts @@ -2,10 +2,7 @@ import { auth, post } from "$lib/utils"; import { json } from "@sveltejs/kit"; export async function POST({ cookies, request }) { - const result = await post( - "/subscription", - await request.json(), - auth(cookies), - ); + const body = await request.json(); + const result = await post("/subscription", body, auth(cookies)); return json(result); } diff --git a/src/routes/(app)/subscription/delete/+server.ts b/src/routes/(app)/subscription/delete/+server.ts new file mode 100644 index 00000000..f4c8357c --- /dev/null +++ b/src/routes/(app)/subscription/delete/+server.ts @@ -0,0 +1,8 @@ +import { auth, post } from "$lib/utils"; +import { json } from "@sveltejs/kit"; + +export async function POST({ cookies, request }) { + const body = await request.json(); + const result = await post("/subscription/delete", body, auth(cookies)); + return json(result); +} |
