From 19ae0d9eb2f1a1c08b04f5c56e8ebd266ef32da8 Mon Sep 17 00:00:00 2001
From: secondl1ght <85003930+secondl1ght@users.noreply.github.com>
Date: Sat, 30 Jul 2022 13:02:42 -0600
Subject: format and remove console logs
---
src/routes/[username]/index.js | 2 +-
src/routes/[username]/index.svelte | 2 --
src/routes/[username]/receive.svelte | 3 +--
src/routes/__layout.svelte | 2 +-
src/routes/invoice/[id].js | 1 -
src/routes/invoice/index.js | 9 +++++---
src/routes/logout/done.svelte | 20 +++++++++---------
src/routes/logout/index.js | 40 ++++++++++++++++++------------------
8 files changed, 39 insertions(+), 40 deletions(-)
(limited to 'src/routes')
diff --git a/src/routes/[username]/index.js b/src/routes/[username]/index.js
index 39a216c2..01613574 100644
--- a/src/routes/[username]/index.js
+++ b/src/routes/[username]/index.js
@@ -1,3 +1,3 @@
export async function GET({ params }) {
- return { body: params }
+ return { body: params };
}
diff --git a/src/routes/[username]/index.svelte b/src/routes/[username]/index.svelte
index fe1f7754..91744aa3 100644
--- a/src/routes/[username]/index.svelte
+++ b/src/routes/[username]/index.svelte
@@ -2,8 +2,6 @@
import { AppHeader, Icon } from '$comp';
import { user } from '$lib/store';
export let username;
-
- console.log($user, username);
{#if $user?.username === username}
diff --git a/src/routes/[username]/receive.svelte b/src/routes/[username]/receive.svelte
index d588eaed..5865d5e5 100644
--- a/src/routes/[username]/receive.svelte
+++ b/src/routes/[username]/receive.svelte
@@ -94,8 +94,7 @@
};
let submit = async () => {
- let { id } = await post('/invoice', { amount, rate: $rate, username: $page.params.username });
- console.log(id)
+ let { id } = await post('/invoice', { amount, rate: $rate, username: $page.params.username });
goto(`/invoice/${id}`);
};
diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte
index 1e4e2560..85f5a817 100644
--- a/src/routes/__layout.svelte
+++ b/src/routes/__layout.svelte
@@ -25,6 +25,6 @@
{#if ready}
-
+
{/if}
diff --git a/src/routes/invoice/[id].js b/src/routes/invoice/[id].js
index 7d18ba86..9a38604f 100644
--- a/src/routes/invoice/[id].js
+++ b/src/routes/invoice/[id].js
@@ -6,7 +6,6 @@ const username = 'bob',
export async function GET({ params }) {
let { id } = params;
let huh = await get(`/invoice?uuid=${id}`);
- console.log(huh)
let { amount, rate, text } = await get(`/invoice?uuid=${id}`);
return { body: { amount, rate, text } };
diff --git a/src/routes/invoice/index.js b/src/routes/invoice/index.js
index d89f7130..f6b1f2cf 100644
--- a/src/routes/invoice/index.js
+++ b/src/routes/invoice/index.js
@@ -3,9 +3,12 @@ import { post } from '$lib/utils';
let network = 'lightning';
export async function POST({ request }) {
- let { amount, rate, username } = await request.json();
- let { text } = await post('/lightning/invoice', );
- let { uuid: id } = await post('/invoice', { invoice: { amount, currency: 'USD', network, rate, text }, user: { username } });
+ let { amount, rate, username } = await request.json();
+ let { text } = await post('/lightning/invoice');
+ let { uuid: id } = await post('/invoice', {
+ invoice: { amount, currency: 'USD', network, rate, text },
+ user: { username }
+ });
return { body: { id } };
}
diff --git a/src/routes/logout/done.svelte b/src/routes/logout/done.svelte
index 894c7b99..50fb766e 100644
--- a/src/routes/logout/done.svelte
+++ b/src/routes/logout/done.svelte
@@ -1,13 +1,13 @@
diff --git a/src/routes/logout/index.js b/src/routes/logout/index.js
index 80e65f8b..6cbae8f2 100644
--- a/src/routes/logout/index.js
+++ b/src/routes/logout/index.js
@@ -1,26 +1,26 @@
-import cookie from "cookie";
+import cookie from 'cookie';
const opts = {
- httpOnly: true,
- sameSite: "lax",
- path: "/",
+ httpOnly: true,
+ sameSite: 'lax',
+ path: '/'
};
export async function GET({ request: { headers } }) {
- return {
- status: 302,
- headers: {
- location: "/logout/done",
- "set-cookie": [
- cookie.serialize("token", "", {
- ...opts,
- expires: new Date(0),
- }),
- cookie.serialize("refresh_token", "", {
- ...opts,
- expires: new Date(0),
- }),
- ],
- },
- };
+ return {
+ status: 302,
+ headers: {
+ location: '/logout/done',
+ 'set-cookie': [
+ cookie.serialize('token', '', {
+ ...opts,
+ expires: new Date(0)
+ }),
+ cookie.serialize('refresh_token', '', {
+ ...opts,
+ expires: new Date(0)
+ })
+ ]
+ }
+ };
}
--
cgit v1.2.3