import { NextResponse } from "next/server";
import { markAllRead } from "@/lib/notifications";

export async function POST() {
  try {
    markAllRead();
    return NextResponse.json({ ok: true });
  } catch (err) {
    return NextResponse.json({ error: err instanceof Error ? err.message : "Unknown error" }, { status: 500 });
  }
}
