diff options
| author | secondl1ght <[email protected]> | 2022-07-30 13:01:35 -0600 |
|---|---|---|
| committer | secondl1ght <[email protected]> | 2022-07-30 13:01:35 -0600 |
| commit | 55719a6d91fad32dc1a633bbbfb5ad9a726ced50 (patch) | |
| tree | c235a822c8b570e6460e5d3b6773b5f025e24531 /src/routes/invoice/index.js | |
| parent | 926b1cd61d5bca6e6e9fd3420681d0829341a1e0 (diff) | |
| parent | 7168cd2ea39aaa2158412bb5e966e144e8a22733 (diff) | |
| download | coinos-ui-55719a6d91fad32dc1a633bbbfb5ad9a726ced50.tar.gz coinos-ui-55719a6d91fad32dc1a633bbbfb5ad9a726ced50.zip | |
Merge branch 'master' of github.com:coinos/coinos-ui-v2
Diffstat (limited to 'src/routes/invoice/index.js')
| -rw-r--r-- | src/routes/invoice/index.js | 11 |
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..d89f7130 --- /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, 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 } }; +} |
