Merged in feat/api-web (pull request #110)
chore: move /api to /api/web
This commit is contained in:
@@ -12,9 +12,9 @@ CURITY_CLIENT_SECRET_USER=""
|
||||
CURITY_ISSUER_USER="https://testlogin.scandichotels.com"
|
||||
CYPRESS_BASE_URL="http://localhost:3000"
|
||||
DESIGN_SYSTEM_ACCESS_TOKEN=""
|
||||
NEXTAUTH_REDIRECT_PROXY_URL="http://localhost:3000/api/auth"
|
||||
NEXTAUTH_REDIRECT_PROXY_URL="http://localhost:3000/api/web/auth"
|
||||
NEXTAUTH_SECRET=""
|
||||
NEXTAUTH_URL="http://localhost:3000/api/auth"
|
||||
NEXTAUTH_URL="http://localhost:3000/api/web/auth"
|
||||
REVALIDATE_SECRET=""
|
||||
SEAMLESS_LOGIN_DA="http://www.example.dk/updatelogin"
|
||||
SEAMLESS_LOGIN_DE="http://www.example.de/updatelogin"
|
||||
|
||||
@@ -6,7 +6,7 @@ import { createContext } from "@/server/context"
|
||||
async function handler(req: Request) {
|
||||
return fetchRequestHandler({
|
||||
createContext,
|
||||
endpoint: "/api/trpc",
|
||||
endpoint: "/api/web/trpc",
|
||||
req,
|
||||
router: appRouter,
|
||||
})
|
||||
1
auth.ts
1
auth.ts
@@ -45,6 +45,7 @@ const customProvider = {
|
||||
} satisfies OIDCConfig<User>
|
||||
|
||||
export const config = {
|
||||
basePath: "/api/web/auth",
|
||||
providers: [customProvider],
|
||||
redirectProxyUrl: env.NEXTAUTH_REDIRECT_PROXY_URL,
|
||||
trustHost: true,
|
||||
|
||||
@@ -35,22 +35,22 @@ export default async function Sidebar({ lang }: SidebarProps) {
|
||||
</Link>
|
||||
{item.subItems
|
||||
? item.subItems.map((subItem) => {
|
||||
return (
|
||||
<Link
|
||||
key={subItem.uid}
|
||||
href={subItem.url}
|
||||
partialMatch
|
||||
variant="sidebar"
|
||||
>
|
||||
{subItem.linkText}
|
||||
</Link>
|
||||
)
|
||||
})
|
||||
return (
|
||||
<Link
|
||||
key={subItem.uid}
|
||||
href={subItem.url}
|
||||
partialMatch
|
||||
variant="sidebar"
|
||||
>
|
||||
{subItem.linkText}
|
||||
</Link>
|
||||
)
|
||||
})
|
||||
: null}
|
||||
</Fragment>
|
||||
))}
|
||||
|
||||
<Link href="/api/auth/signout" variant="sidebar">
|
||||
<Link href="/api/web/auth/signout" variant="sidebar">
|
||||
Log out <LogOut height={16} width={16} />
|
||||
</Link>
|
||||
</nav>
|
||||
|
||||
@@ -15,7 +15,7 @@ function initializeTrpcClient() {
|
||||
/**
|
||||
* This is locally in Next.js
|
||||
*/
|
||||
url: `http://localhost:${env.NEXT_PUBLIC_PORT}/api/trpc`,
|
||||
url: `http://localhost:${env.NEXT_PUBLIC_PORT}/api/web/trpc`,
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user