Skip to content

Commit d763062

Browse files
committed
fix(logs): keep /api/v1/logs on primary db — its permissions join is the auth gate, not replica-safe
1 parent 2b541ce commit d763062

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { dbReplica } from '@sim/db'
1+
import { db } from '@sim/db'
22
import { permissions, workflow, workflowExecutionLogs } from '@sim/db/schema'
33
import { createLogger } from '@sim/logger'
44
import { generateId } from '@sim/utils/id'
@@ -101,7 +101,7 @@ export const GET = withRouteHandler(async (request: NextRequest) => {
101101
const conditions = buildLogFilters(filters)
102102
const orderBy = getOrderBy(params.order)
103103

104-
const baseQuery = dbReplica
104+
const baseQuery = db
105105
.select({
106106
id: workflowExecutionLogs.id,
107107
workflowId: workflowExecutionLogs.workflowId,

0 commit comments

Comments
 (0)