fix(admin): corrections to sending over to test server for updates

This commit is contained in:
2025-10-08 10:08:06 -05:00
parent 26b769f477
commit 7964cda197
4 changed files with 18 additions and 15 deletions

View File

@@ -50,7 +50,7 @@ router.post("/", async (req: Request, res: Response) => {
withCredentials: true,
});
const loginRes = await axiosInstance.post(
const loginRes = (await axiosInstance.post(
`${process.env.MAIN_SERVER}/lst/api/auth/sign-in/username`,
{
username: process.env.MAIN_SERVER_USERNAME,
@@ -59,8 +59,8 @@ router.post("/", async (req: Request, res: Response) => {
{
headers: { "Content-Type": "application/json" },
}
);
const setCookie = loginRes.headers["set-cookie"];
)) as any;
const setCookie = loginRes.headers["set-cookie"][0];
if (!setCookie) {
throw new Error("Did not receive a Set-Cookie header from login");
@@ -73,7 +73,7 @@ router.post("/", async (req: Request, res: Response) => {
{
headers: {
"Content-Type": "application/json",
Cookie: setCookie.join("; "),
Cookie: setCookie.split(";")[0],
},
withCredentials: true,
}