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.

fix cron jobs

Steven Tey1d5052d6d68d
diff --git a/app/api/cron/domains/route.ts b/app/api/cron/domains/route.ts
index 727426693c..21f42458ea 100644
--- a/app/api/cron/domains/route.ts
+++ b/app/api/cron/domains/route.ts
@@ -18,8 +18,8 @@ import { log } from "#/lib/utils";
**/
export async function POST(req: Request) {
+ const body = await req.json();
if (process.env.VERCEL === "1") {
- const body = await req.json();
const isValid = await receiver.verify({
signature: req.headers.get("Upstash-Signature") || "",
body: JSON.stringify(body),
diff --git a/app/api/cron/usage/route.ts b/app/api/cron/usage/route.ts
index 71c563ddda..4f03731e58 100644
--- a/app/api/cron/usage/route.ts
+++ b/app/api/cron/usage/route.ts
@@ -9,8 +9,8 @@ import { receiver } from "#/lib/cron";
**/
export async function POST(req: Request) {
+ const body = await req.json();
if (process.env.VERCEL === "1") {
- const body = await req.json();
const isValid = await receiver.verify({
signature: req.headers.get("Upstash-Signature") || "",
body: JSON.stringify(body),