The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Revalidate apply page cache synchronously (#3959)
Pedro Ladeirafca40d0a5c0d
diff --git a/apps/web/lib/actions/partners/update-program.ts b/apps/web/lib/actions/partners/update-program.tsindex b898597ccc..28ecd81685 100644--- a/apps/web/lib/actions/partners/update-program.ts+++ b/apps/web/lib/actions/partners/update-program.ts@@ -62,27 +62,25 @@ export const updateProgramAction = authActionClient},});- waitUntil(- (async () => {- await recordAuditLog({- workspaceId: workspace.id,- programId: program.id,- action: "program.updated",- description: `Program ${program.name} updated`,- actor: user,- targets: [- {- type: "program",- id: program.id,- metadata: updatedProgram,- },- ],- });+ if (updatedProgram.termsUrl !== program.termsUrl) {+ revalidatePath(`/partners.dub.co/${program.slug}/apply`);+ }- if (updatedProgram.termsUrl !== program.termsUrl) {- revalidatePath(`/partners.dub.co/${program.slug}/apply`);- }- })(),+ waitUntil(+ recordAuditLog({+ workspaceId: workspace.id,+ programId: program.id,+ action: "program.updated",+ description: `Program ${program.name} updated`,+ actor: user,+ targets: [+ {+ type: "program",+ id: program.id,+ metadata: updatedProgram,+ },+ ],+ }),);return {