Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

412 B
Raw Blame
import { withCron } from "@/lib/cron/with-cron";
import { logAndRespond } from "../utils";
import { updateUsage } from "./utils";

export const dynamic = "force-dynamic";

/*
    This route is used to update the usage stats of each workspace.
    Runs once every day at noon UTC (0 12 * * *)
*/
export const POST = withCron(async () => {
  const result = await updateUsage();
  return logAndRespond(result);
});