Skip to content

Commit 90a566b

Browse files
committed
Fix api/auth route conflict
The `api/auth` route added for the changelog conflicts with the `api/auth` docs page that would normally be handled by the catchall `[[...path]]` route, causing those doc pages to 404. Since the newly added `api/auth` is used by the changelog, move it under the `changelog` path to fix the route conflict.
1 parent 8b822e1 commit 90a566b

File tree

5 files changed

+4
-4
lines changed

5 files changed

+4
-4
lines changed

app/changelog/%5Fadmin/layout.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {type ReactNode, Suspense} from 'react';
2-
import {GET} from 'app/api/auth/[...nextauth]/route';
2+
import {GET} from 'app/changelog/api/auth/[...nextauth]/route';
33
import {getServerSession} from 'next-auth/next';
44

55
import LoginButton from 'sentry-docs/components/changelog/loginButton';

app/changelog/%5Fadmin/upload/route.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import crypto from 'crypto';
22

33
import {Storage} from '@google-cloud/storage';
4-
import {GET as sessionHandler} from 'app/api/auth/[...nextauth]/route';
4+
import {GET as sessionHandler} from 'app/changelog/api/auth/[...nextauth]/route';
55
import {NextRequest} from 'next/server';
66
import {getServerSession} from 'next-auth/next';
77

app/changelog/[slug]/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {Fragment, Suspense} from 'react';
22
import {type Category, type Changelog} from '@prisma/client';
33
import * as Sentry from '@sentry/nextjs';
4-
import {GET} from 'app/api/auth/[...nextauth]/route';
4+
import {GET} from 'app/changelog/api/auth/[...nextauth]/route';
55
import type {Metadata, ResolvingMetadata} from 'next';
66
import Link from 'next/link';
77
import {getServerSession} from 'next-auth/next';

src/actions/changelog.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use server';
22

3-
import {GET as handler} from 'app/api/auth/[...nextauth]/route';
3+
import {GET as handler} from 'app/changelog/api/auth/[...nextauth]/route';
44
import {revalidatePath} from 'next/cache';
55
import {redirect} from 'next/navigation';
66
import {getServerSession} from 'next-auth/next';

0 commit comments

Comments
 (0)