Add comprehensive CSS styles for the MCP Marketplace interface, including card hover effects, responsive grid layout, modal backdrop blur, category badges, rating stars, install buttons, and loading animations. Also include custom scrollbar styling for the model selector to enhance user experience and visual consistency.
29 lines
683 B
TypeScript
29 lines
683 B
TypeScript
import { NextRequest, NextResponse } from "next/server";
|
|
import { deleteModel } from "@/lib/ollama";
|
|
|
|
export async function DELETE(request: NextRequest) {
|
|
try {
|
|
const { modelName } = await request.json();
|
|
|
|
if (!modelName) {
|
|
return NextResponse.json(
|
|
{ error: "Model name is required" },
|
|
{ status: 400 }
|
|
);
|
|
}
|
|
|
|
await deleteModel(modelName);
|
|
|
|
return NextResponse.json({
|
|
success: true,
|
|
message: `Model ${modelName} deleted successfully`,
|
|
});
|
|
} catch (error) {
|
|
console.error("Error deleting model:", error);
|
|
return NextResponse.json(
|
|
{ error: "Failed to delete model" },
|
|
{ status: 500 }
|
|
);
|
|
}
|
|
}
|