fix imports

This commit is contained in:
Balázs Orbán
2023-04-27 10:58:02 +02:00
parent da40242e48
commit 29ce4cb4d4
2 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
// This is an example of how to protect content using server rendering
import { getServerSession } from "next-auth/next"
import { authOptions } from "./api/auth/[...nextauth]"
import { authConfig } from "./api/auth-old/[...nextauth]"
import Layout from "../components/layout"
import AccessDenied from "../components/access-denied"
@@ -26,7 +26,7 @@ export default function Page({ content, session }) {
}
export async function getServerSideProps(context) {
const session = await getServerSession(context.req, context.res, authOptions)
const session = await getServerSession(context.req, context.res, authConfig)
let content = null
if (session) {

View File

@@ -1,6 +1,6 @@
import { getServerSession } from "next-auth/next"
import Layout from "../components/layout"
import { authOptions } from "./api/auth/[...nextauth]"
import { authConfig } from "./api/auth-old/[...nextauth]"
export default function Page() {
// As this page uses Server Side Rendering, the `session` will be already
@@ -40,7 +40,7 @@ export default function Page() {
export async function getServerSideProps(context) {
return {
props: {
session: await getServerSession(context.req, context.res, authOptions),
session: await getServerSession(context.req, context.res, authConfig),
},
}
}