aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/invoice/index.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-07-30 11:13:39 -0700
committerAdam Soltys <[email protected]>2022-07-30 11:13:39 -0700
commite183a44d5447037ea807698b08d5a9497891628b (patch)
treed63cd5d45d45dae085704ead3eb306f80a3ebc46 /src/routes/invoice/index.js
parente969501cbaeafaa5b81c20b73455ab19cde2eb0e (diff)
downloadcoinos-ui-e183a44d5447037ea807698b08d5a9497891628b.tar.gz
coinos-ui-e183a44d5447037ea807698b08d5a9497891628b.zip
get invoice by uuid
Diffstat (limited to 'src/routes/invoice/index.js')
-rw-r--r--src/routes/invoice/index.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/routes/invoice/index.js b/src/routes/invoice/index.js
new file mode 100644
index 00000000..26bffd37
--- /dev/null
+++ b/src/routes/invoice/index.js
@@ -0,0 +1,11 @@
+import { post } from '$lib/utils';
+
+let network = 'lightning';
+
+export async function POST({ request }) {
+ let { amount, username } = await request.json();
+ let { text } = await post('/lightning/invoice', );
+ let { uuid: id } = await post('/invoice', { invoice: { text, network }, user: { username } });
+
+ return { body: { id } };
+}