Guest User

Untitled

a guest
Jun 27th, 2023
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { getServerSession } from "next-auth/next"
  2. export default async function handler(req, res) {    
  3.     const session = await getServerSession(req, res);
  4.    if (!session) {
  5.     res.status(401).json({ message: "You must be logged in." });
  6.     return;
  7.   }
Advertisement
Add Comment
Please, Sign In to add comment