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 | de6c1ad727379c5ebe8550124ea9313979124953 (patch) | |
| tree | 67df287630d6e76484be526522038022a1ccf546 /src/routes/(app)/locations | |
| parent | 002cd9134d2e23bec34f838f6d6fefba41f2d530 (diff) | |
| download | coinos-ui-de6c1ad727379c5ebe8550124ea9313979124953.tar.gz coinos-ui-de6c1ad727379c5ebe8550124ea9313979124953.zip | |
push notifications
Diffstat (limited to 'src/routes/(app)/locations')
| -rw-r--r-- | src/routes/(app)/locations/+server.ts | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/routes/(app)/locations/+server.ts b/src/routes/(app)/locations/+server.ts index 987459bc..f3fa1023 100644 --- a/src/routes/(app)/locations/+server.ts +++ b/src/routes/(app)/locations/+server.ts @@ -2,14 +2,15 @@ import { get } from "$lib/utils"; import { json } from "@sveltejs/kit"; export async function GET({ setHeaders }) { - let locations = []; + let locations = []; - try { - ({ locations } = await get("/locations")); - setHeaders({ "cache-control": "public, max-age=600" }); - } catch (e) { - console.log("failed to fetch locations"); - } + try { + ({ locations } = await get("/locations")); + console.log(locations); + setHeaders({ "cache-control": "public, max-age=600" }); + } catch (e) { + console.log("failed to fetch locations"); + } - return json({ locations }); + return json({ locations }); } |
