mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-06 11:06:29 +00:00
Move auth config and build admin menus
Extract NextAuth configuration into a shared library, load admin sidebar items from role permissions, and update related RBAC types and UI.
This commit is contained in:
+1
-1
@@ -1,8 +1,8 @@
|
||||
import { getServerSession } from "next-auth"
|
||||
import { authOptions } from "@/pages/api/auth/[...nextauth]"
|
||||
import { redirect } from "next/navigation"
|
||||
import { ResponseData } from "@/types/types"
|
||||
import { logger } from "./logger"
|
||||
import { authOptions } from "./auth"
|
||||
|
||||
export default async function fetchData(url: string = '/', cache: "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload" = 'default', next?: NextFetchRequestConfig) {
|
||||
const { BASE_URL_API } = process.env
|
||||
|
||||
Reference in New Issue
Block a user