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.

bump maxDuration

Steven Teyba5650bdd2e7
diff --git a/apps/web/app/api/cron/import/bitly/route.ts b/apps/web/app/api/cron/import/bitly/route.ts
index c0945f7b62..eecf793903 100644
--- a/apps/web/app/api/cron/import/bitly/route.ts
+++ b/apps/web/app/api/cron/import/bitly/route.ts
@@ -6,6 +6,8 @@ import { log } from "@dub/utils";
import { NextResponse } from "next/server";
import { importLinksFromBitly } from "./utils";
+export const maxDuration = 300;
+
export async function POST(req: Request) {
const body = await req.json();
if (process.env.VERCEL === "1") {
diff --git a/apps/web/app/api/cron/import/short/route.ts b/apps/web/app/api/cron/import/short/route.ts
index 369cb374e0..7064afb558 100644
--- a/apps/web/app/api/cron/import/short/route.ts
+++ b/apps/web/app/api/cron/import/short/route.ts
@@ -4,6 +4,8 @@ import { log } from "@dub/utils";
import { NextResponse } from "next/server";
import { importLinksFromShort } from "./utils";
+export const maxDuration = 300;
+
export async function POST(req: Request) {
const body = await req.json();
if (process.env.VERCEL === "1") {
diff --git a/apps/web/scripts/fix-owner-links.ts b/apps/web/scripts/fix-owner-links.ts
new file mode 100644
index 0000000000..26cc3c75ae
--- /dev/null
+++ b/apps/web/scripts/fix-owner-links.ts
@@ -0,0 +1,16 @@
+import "dotenv-flow/config";
+import prisma from "@/lib/prisma";
+
+async function main() {
+ const users = await prisma.link.updateMany({
+ where: {
+ projectId: "xxx",
+ },
+ data: {
+ userId: "xxx",
+ },
+ });
+ console.log(users);
+}
+
+main();