import superagent from "superagent"; export async function isSessionValid(token: string): Promise { let res = await superagent.get("https://peh-internal.minteck.org/api/session") .set("Cookie", "PEH2_SESSION_TOKEN=" + token) .send(); if (res.text === "VALID") return true; return false; }