Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { getSession } from 'next-auth/react';
- export default async function handler(req, res) {
- const session = await getSession({ req });
- if (!session) {
- res.status(401).json({ message: "You must be logged in." });
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment