diff options
author | 2022-03-29 08:18:11 -0400 | |
---|---|---|
committer | 2022-03-29 08:18:11 -0400 | |
commit | ecbcc8c42cab4b043821bbc31574397fdbf9d481 (patch) | |
tree | 206c81382bfef18d8b6a390b24f6a8185f827c0e /examples/ssr/src/api.ts | |
parent | f89dc5c04afbcc63636d2f63cdf7a92ebd80acc4 (diff) | |
download | astro-ecbcc8c42cab4b043821bbc31574397fdbf9d481.tar.gz astro-ecbcc8c42cab4b043821bbc31574397fdbf9d481.tar.zst astro-ecbcc8c42cab4b043821bbc31574397fdbf9d481.zip |
Make it deployable to Netlify (#2931)
Diffstat (limited to 'examples/ssr/src/api.ts')
-rw-r--r-- | examples/ssr/src/api.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/ssr/src/api.ts b/examples/ssr/src/api.ts index 40058360b..64dfe17d3 100644 --- a/examples/ssr/src/api.ts +++ b/examples/ssr/src/api.ts @@ -60,7 +60,7 @@ export async function getCart(): Promise<Cart> { } export async function addToUserCart(id: number | string, name: string): Promise<void> { - await fetch(`${origin}/api/add-to-cart`, { + await fetch(`${origin}/api/cart`, { credentials: 'same-origin', method: 'POST', mode: 'no-cors', |