Skip to content

Commit e7174b1

Browse files
committed
API fixes
1 parent 02e533e commit e7174b1

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

src/app/api/passwords/[passwordId]/route.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ import prismadb from "@/lib/prismadb";
22
import { auth } from "@clerk/nextjs/server";
33
import { NextResponse } from "next/server";
44

5-
export async function DELETE(
6-
req: Request,
7-
{ params }: { params: { passwordId: Promise<string> } }
8-
) {
5+
export async function DELETE(req: Request, props: { params: Promise<{ passwordId: Promise<string> }> }) {
6+
const params = await props.params;
97
try {
108
const { userId } = await auth();
119

@@ -42,10 +40,8 @@ export async function DELETE(
4240
}
4341
}
4442

45-
export async function PATCH(
46-
req: Request,
47-
{ params }: { params: { passwordId: Promise<string> } }
48-
) {
43+
export async function PATCH(req: Request, props: { params: Promise<{ passwordId: Promise<string> }> }) {
44+
const params = await props.params;
4945
try {
5046
const { userId } = await auth();
5147

src/components/ui/vault/password/details-panel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const DetailsPanel: React.FC<DetailsPanelProps> = ({
109109
<Button variant="outline" size="icon" onClick={() => handleDelete()}>
110110
<Trash />
111111
</Button>
112-
<Button
112+
<Button
113113
variant="outline"
114114
size="icon"
115115
onClick={() => (isEditing ? handleSave() : setIsEditing(true))}

0 commit comments

Comments
 (0)