|
3 | 3 | const API_URL = "https://catalyst-order-server-0140d799e2f7.herokuapp.com/"; |
4 | 4 |
|
5 | 5 | async function getOrders(): Promise<getOrdersEvent> { |
6 | | - const orderServerResponse = await fetch(API_URL + "orders/"); |
| 6 | + const orderServerResponse = await fetch(API_URL + "orders/", { |
| 7 | + method: "post", |
| 8 | + }); |
7 | 9 | const fetchedOrders = (await orderServerResponse.json()) as getOrdersEvent; |
8 | 10 |
|
9 | 11 | return fetchedOrders; |
|
12 | 14 | let request: undefined | Promise<getOrdersEvent> = undefined; |
13 | 15 | </script> |
14 | 16 |
|
| 17 | +<!-- <a |
| 18 | + style="font: inherit;align-items: flex-start; |
| 19 | + text-align: center; |
| 20 | + cursor: default; |
| 21 | + color: buttontext; |
| 22 | + padding-block-start: 2px; |
| 23 | + padding-block-end: 3px; |
| 24 | + padding-inline-start: 6px; |
| 25 | + border-top-width: 2px; |
| 26 | + border-right-width: 2px; |
| 27 | + border-bottom-width: 2px; |
| 28 | + border-left-width: 2px; |
| 29 | + border-top-style: outset; |
| 30 | + border-right-style: outset; |
| 31 | + border-bottom-style: outset; |
| 32 | + border-left-style: outset; |
| 33 | + border-top-color: buttonface; |
| 34 | + border-right-color: buttonface; |
| 35 | + border-bottom-color: buttonface; |
| 36 | + border-left-color: buttonface; |
| 37 | + background-color: buttonface;margin-top: 0em; |
| 38 | + color: initial; |
| 39 | + letter-spacing: normal; |
| 40 | + word-spacing: normal; |
| 41 | + line-height: normal; |
| 42 | + text-transform: none; |
| 43 | + text-indent: 0px; |
| 44 | + text-shadow: none; |
| 45 | + display: inline-block; |
| 46 | + text-align: start;" |
| 47 | + href={API_URL + "orders/"} |
| 48 | + target="_blank" |
| 49 | + rel="noopener noreferrer" |
| 50 | +> |
| 51 | + getOrders() |
| 52 | +</a> --> |
| 53 | + |
15 | 54 | {#await request} |
16 | 55 | <button disabled>Waiting</button> |
17 | 56 | {:then} |
|
0 commit comments