fix(admin): corrections to sending over to test server for updates
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user