refactor: standardize code formatting and improve consistency across various components and API routes for enhanced readability and maintainability
This commit is contained in:
@@ -23,7 +23,7 @@ export async function POST(request: Request) {
|
||||
console.error("Error creating folder:", error);
|
||||
return NextResponse.json(
|
||||
{ error: "Failed to create folder" },
|
||||
{ status: 500 }
|
||||
{ status: 500 },
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,7 @@ export async function PUT(request: Request) {
|
||||
console.error("Error updating folder:", error);
|
||||
return NextResponse.json(
|
||||
{ error: "Failed to update folder" },
|
||||
{ status: 500 }
|
||||
{ status: 500 },
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ export async function DELETE(request: Request) {
|
||||
if (!id) {
|
||||
return NextResponse.json(
|
||||
{ error: "Folder ID is required" },
|
||||
{ status: 400 }
|
||||
{ status: 400 },
|
||||
);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ export async function DELETE(request: Request) {
|
||||
headers: {
|
||||
"Cache-Control": "no-store",
|
||||
},
|
||||
}
|
||||
},
|
||||
);
|
||||
} catch (error) {
|
||||
if (error instanceof FolderNotFoundError) {
|
||||
@@ -88,7 +88,7 @@ export async function DELETE(request: Request) {
|
||||
console.error("Error deleting folder:", error);
|
||||
return NextResponse.json(
|
||||
{ error: "Failed to delete folder" },
|
||||
{ status: 500 }
|
||||
{ status: 500 },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user