Its working!

This commit is contained in:
Owen Schwartz
2024-10-06 22:09:30 -04:00
parent 800dcb6270
commit 143a3b756e
10 changed files with 81 additions and 15 deletions

View File

@@ -1,11 +1,11 @@
import api from "@app/api";
import { internal } from "@app/api";
import { cookies } from "next/headers";
export async function verifySession() {
const sessionId = cookies().get("session")?.value ?? null;
try {
await api.get("/user", {
await internal.get("/user", {
headers: {
Cookie: `session=${sessionId}`
}