mirror of
https://github.com/skidoodle/budgetable.git
synced 2026-04-28 15:57:36 +02:00
refactor: update imports to use 'type' for TypeScript types and enhance tooltip functionality
This commit is contained in:
+20
-14
@@ -21,14 +21,17 @@ export async function GET() {
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("Error fetching data:", error);
|
||||
return Response.json({
|
||||
error: {
|
||||
message: "Failed to fetch data",
|
||||
return Response.json(
|
||||
{
|
||||
error: {
|
||||
message: "Failed to fetch data",
|
||||
},
|
||||
},
|
||||
}, {
|
||||
status: 500,
|
||||
headers: { "Content-Type": "application/json" },
|
||||
});
|
||||
{
|
||||
status: 500,
|
||||
headers: { "Content-Type": "application/json" },
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,13 +46,16 @@ export async function POST(req: Request) {
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("Error adding data:", error);
|
||||
return Response.json({
|
||||
error: {
|
||||
message: "Failed to add data",
|
||||
return Response.json(
|
||||
{
|
||||
error: {
|
||||
message: "Failed to add data",
|
||||
},
|
||||
},
|
||||
}, {
|
||||
status: 500,
|
||||
headers: { "Content-Type": "application/json" },
|
||||
});
|
||||
{
|
||||
status: 500,
|
||||
headers: { "Content-Type": "application/json" },
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user