Skip to content

Commit ff3c8f7

Browse files
authored
fix(file-block): fix get op (#4590)
* File block get * Lint * Fix * Fix auth
1 parent 214355b commit ff3c8f7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • apps/sim/app/api/tools/file/manage

apps/sim/app/api/tools/file/manage/route.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
uploadWorkspaceFile,
1515
} from '@/lib/uploads/contexts/workspace/workspace-file-manager'
1616
import { getFileExtension, getMimeTypeFromExtension } from '@/lib/uploads/utils/file-utils'
17+
import { assertActiveWorkspaceAccess } from '@/lib/workspaces/permissions/utils'
1718

1819
export const dynamic = 'force-dynamic'
1920

@@ -40,6 +41,8 @@ export const POST = withRouteHandler(async (request: NextRequest) => {
4041
}
4142

4243
try {
44+
await assertActiveWorkspaceAccess(workspaceId, userId)
45+
4346
switch (body.operation) {
4447
case 'get': {
4548
const { fileId, fileInput } = body

0 commit comments

Comments
 (0)