|
|
@@ -1,16 +1,15 @@
|
|
|
import {PRIVATE_API_URL} from "$env/static/private";
|
|
|
import {fetch} from "undici";
|
|
|
|
|
|
-export async function POST({params, request, cookies}){
|
|
|
- const cookie = cookies.get("user");
|
|
|
+export async function POST({params, request}){
|
|
|
const body = await request.json();
|
|
|
|
|
|
const res = await fetch(`${PRIVATE_API_URL}/game/${params.game_id}/session/${params.session_id}/turn`, {
|
|
|
method: "POST",
|
|
|
headers: {
|
|
|
"Content-Type": "application/json",
|
|
|
- "Cookie": `user=${cookie}`,
|
|
|
- "Accept-Encoding": "identity"
|
|
|
+ "Accept-Encoding": "identity",
|
|
|
+ Cookie: request.headers.get("cookie") ?? ""
|
|
|
},
|
|
|
body: JSON.stringify(body),
|
|
|
duplex: "half"
|