Skip to content

Commit

Permalink
next 15 shift
Browse files Browse the repository at this point in the history
  • Loading branch information
SuzalShrestha committed Feb 3, 2025
1 parent 852270a commit caf3844
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/api/notes/[noteId]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ const prisma = new PrismaClient();

export async function GET(
request: NextRequest,
context: { params: { noteId: string } }
context: { params: Promise<{ noteId: string }> }
) {
try {
const noteId = await context.params.noteId;
const noteId = await (await context.params).noteId;

const note = await prisma.secureText.findUnique({
where: { urlPath: noteId },
Expand Down Expand Up @@ -74,10 +74,10 @@ export async function GET(

export async function POST(
request: NextRequest,
context: { params: { noteId: string } }
context: { params: Promise<{ noteId: string }> }
) {
try {
const noteId = await context.params.noteId;
const noteId = await (await context.params).noteId;
const { text } = await request.json();
const password = request.headers.get('X-Note-Password');

Expand Down

0 comments on commit caf3844

Please sign in to comment.