重构大量文件
This commit is contained in:
@@ -11,7 +11,7 @@ export async function GET() {
|
||||
tags: JSON.parse(p.tags || "[]")
|
||||
}));
|
||||
return NextResponse.json(parsedPages);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
return NextResponse.json({ error: 'Error fetching pages' }, { status: 500 });
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@ export async function POST(request: Request) {
|
||||
},
|
||||
});
|
||||
return NextResponse.json({ ...page, tags: JSON.parse(page.tags || "[]") });
|
||||
} catch (error) {
|
||||
} catch {
|
||||
return NextResponse.json({ error: 'Error creating page' }, { status: 500 });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user