This commit is contained in:
Vikhyath Mondreti
2025-06-27 19:07:30 -07:00
parent 244c086ef2
commit 05c83e27b9
4 changed files with 8 additions and 7 deletions

View File

@@ -3,9 +3,9 @@ import { and, eq, isNull } from 'drizzle-orm'
import { NextResponse } from 'next/server'
import { getSession } from '@/lib/auth'
import { createLogger } from '@/lib/logs/console-logger'
import { getUserEntityPermissions } from '@/lib/permissions/utils'
import { db } from '@/db'
import { workflow, workspace } from '@/db/schema'
import { getUserEntityPermissions } from '@/lib/permissions/utils'
const logger = createLogger('WorkflowAPI')
@@ -22,8 +22,6 @@ async function verifyWorkspaceMembership(
try {
const permission = await getUserEntityPermissions(userId, 'workspace', workspaceId)
return permission
} catch (error) {
logger.error(`Error verifying workspace permissions for ${userId} in ${workspaceId}:`, error)

View File

@@ -32,7 +32,12 @@ const IS_DEV = process.env.NODE_ENV === 'development'
export function Sidebar() {
useGlobalShortcuts()
const { workflows, createWorkflow, isLoading: workflowsLoading, loadWorkflows } = useWorkflowRegistry()
const {
workflows,
createWorkflow,
isLoading: workflowsLoading,
loadWorkflows,
} = useWorkflowRegistry()
const { isPending: sessionLoading } = useSession()
const userPermissions = useUserPermissionsContext()
const isLoading = workflowsLoading || sessionLoading

View File

@@ -1,4 +1,4 @@
import { and, eq } from 'drizzle-orm'
import { eq } from 'drizzle-orm'
import { db } from '../../db'
import { workflow } from '../../db/schema'
import { createLogger } from '../../lib/logs/console-logger'

View File

@@ -63,8 +63,6 @@ async function initializeApplication(): Promise<void> {
}
}
/**
* Checks if application is fully initialized
*/