Skip to content

Commit 1b0d304

Browse files
authored
fix(dynamic): remove force-dynamic from routes that don't need it (#888)
1 parent 94368eb commit 1b0d304

File tree

13 files changed

+11
-36
lines changed

13 files changed

+11
-36
lines changed

apps/sim/app/api/auth/oauth/connections/route.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import { createLogger } from '@/lib/logs/console/logger'
66
import { db } from '@/db'
77
import { account, user } from '@/db/schema'
88

9-
export const dynamic = 'force-dynamic'
10-
119
const logger = createLogger('OAuthConnectionsAPI')
1210

1311
interface GoogleIdToken {

apps/sim/app/api/billing/route.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import { member } from '@/db/schema'
99

1010
const logger = createLogger('UnifiedBillingAPI')
1111

12-
export const dynamic = 'force-dynamic'
13-
1412
/**
1513
* Unified Billing Endpoint
1614
*/

apps/sim/app/api/files/serve/[...path]/route.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ import {
1313
getContentType,
1414
} from '@/app/api/files/utils'
1515

16-
export const dynamic = 'force-dynamic'
17-
1816
const logger = createLogger('FilesServeAPI')
1917

2018
async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise<Buffer> {

apps/sim/app/api/folders/[id]/route.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ import { and, eq } from 'drizzle-orm'
22
import { type NextRequest, NextResponse } from 'next/server'
33
import { getSession } from '@/lib/auth'
44
import { createLogger } from '@/lib/logs/console/logger'
5-
6-
export const dynamic = 'force-dynamic'
7-
85
import { getUserEntityPermissions } from '@/lib/permissions/utils'
96
import { db } from '@/db'
107
import { workflow, workflowFolder } from '@/db/schema'

apps/sim/app/api/folders/route.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import { workflowFolder } from '@/db/schema'
88

99
const logger = createLogger('FoldersAPI')
1010

11-
export const dynamic = 'force-dynamic'
12-
1311
// GET - Fetch folders for a workspace
1412
export async function GET(request: NextRequest) {
1513
try {

apps/sim/app/api/logs/route.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ function extractBlockExecutionsFromTraceSpans(traceSpans: any[]): any[] {
4141
return blockExecutions
4242
}
4343

44-
export const dynamic = 'force-dynamic'
4544
export const revalidate = 0
4645

4746
const QueryParamsSchema = z.object({

apps/sim/app/api/organizations/[id]/route.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ import {
77
updateOrganizationSeats,
88
} from '@/lib/billing/validation/seat-management'
99
import { createLogger } from '@/lib/logs/console/logger'
10-
11-
export const dynamic = 'force-dynamic'
12-
1310
import { db } from '@/db'
1411
import { member, organization } from '@/db/schema'
1512

apps/sim/app/api/organizations/[id]/workspaces/route.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import { member, permissions, user, workspace } from '@/db/schema'
77

88
const logger = createLogger('OrganizationWorkspacesAPI')
99

10-
export const dynamic = 'force-dynamic'
11-
1210
/**
1311
* GET /api/organizations/[id]/workspaces
1412
* Get workspaces related to the organization with optional filtering

apps/sim/app/api/templates/[id]/route.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { templates } from '@/db/schema'
77

88
const logger = createLogger('TemplateByIdAPI')
99

10-
export const dynamic = 'force-dynamic'
1110
export const revalidate = 0
1211

1312
// GET /api/templates/[id] - Retrieve a single template by ID

apps/sim/app/api/templates/route.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { templateStars, templates, workflow } from '@/db/schema'
99

1010
const logger = createLogger('TemplatesAPI')
1111

12-
export const dynamic = 'force-dynamic'
1312
export const revalidate = 0
1413

1514
// Function to sanitize sensitive data from workflow state

0 commit comments

Comments
 (0)