Skip to content

Commit

Permalink
Merge pull request #10 from badgeteam/bug/restricted-fn
Browse files Browse the repository at this point in the history
Name export default function
  • Loading branch information
edwinm authored Oct 15, 2024
2 parents a3a185e + a3385a7 commit 0d48b8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/api/restricted.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getServerSession } from "next-auth/next";
import { authOptions } from "./auth/[...nextauth]";

export default async function(req, res) {
export default async function restricted(req, res) {
const session = await getServerSession(req, res, authOptions);

if (session) {
Expand All @@ -15,4 +15,4 @@ export default async function(req, res) {
"You must be signed in to view the protected content on this page.",
});
}
};
}

0 comments on commit 0d48b8a

Please sign in to comment.