mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
fix(file-block): fix get op (#4590)
* File block get * Lint * Fix * Fix auth
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
uploadWorkspaceFile,
|
||||
} from '@/lib/uploads/contexts/workspace/workspace-file-manager'
|
||||
import { getFileExtension, getMimeTypeFromExtension } from '@/lib/uploads/utils/file-utils'
|
||||
import { assertActiveWorkspaceAccess } from '@/lib/workspaces/permissions/utils'
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
@@ -40,6 +41,8 @@ export const POST = withRouteHandler(async (request: NextRequest) => {
|
||||
}
|
||||
|
||||
try {
|
||||
await assertActiveWorkspaceAccess(workspaceId, userId)
|
||||
|
||||
switch (body.operation) {
|
||||
case 'get': {
|
||||
const { fileId, fileInput } = body
|
||||
|
||||
Reference in New Issue
Block a user