Hey, i cloned https://github.com/emmaboecker/mod-installer and while using it when i try to save mods
It says that the session is not found
https://next-auth.js.org/errors#client_fetch_error undefined {
error: {},
url: 'http://141.94.37.234:3000/api/auth/session',
message: undefined
}
I tried to got at http://141.94.37.234:3000/api/auth/session and i can see my session json with my info filed so idk why it saying that i don't find it
Here is the concerned code :
set.ts
import type {NextApiRequest, NextApiResponse} from 'next'
import clientPromise from "../../../lib/mongodb";
import {getSession} from "next-auth/react";
import {Loader, Mod, ModProfile, Server} from "../../../types/modProfile";
import {Role} from "../../../types/role";
import {makeId} from "../../../lib/makeId";
export default async function handler(
req: NextApiRequest,
res: NextApiResponse
) {
if (req.method !== "POST") {
res.status(405).send({message: "Only POST requests allowed"})
return
}
const session = await getSession(res)
if (!session) {
res.status(401).end()
return
}
....