Fix type import and nullish coalescing warnings

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-06 20:03:37 +00:00
parent 2c2a7d06d1
commit 016cdde654
2 changed files with 11 additions and 8 deletions

View File

@@ -26,6 +26,6 @@ export async function getComments(): Promise<Comment[]> {
content: c.content,
createdAt: Number(c.createdAt),
updatedAt: (c.updatedAt !== null && c.updatedAt !== undefined) ? Number(c.updatedAt) : undefined,
parentId: (c.parentId !== null && c.parentId !== undefined) ? c.parentId : undefined,
parentId: (c.parentId !== null && c.parentId !== undefined && c.parentId !== '') ? c.parentId : undefined,
}))
}

View File

@@ -44,18 +44,21 @@ export interface ComponentConfig {
}
}
import type { User, Workflow, LuaScript, PageConfig, AppConfiguration, Comment } from '../../types/level-types'
import type { ModelSchema } from '../../types/schema-types'
/**
* Full database schema type
*/
export interface DatabaseSchema {
users: import('../../types/level-types').User[]
users: User[]
credentials: Record<string, string>
workflows: import('../../types/level-types').Workflow[]
luaScripts: import('../../types/level-types').LuaScript[]
pages: import('../../types/level-types').PageConfig[]
schemas: import('../../types/schema-types').ModelSchema[]
appConfig: import('../../types/level-types').AppConfiguration
comments: import('../../types/level-types').Comment[]
workflows: Workflow[]
luaScripts: LuaScript[]
pages: PageConfig[]
schemas: ModelSchema[]
appConfig: AppConfiguration
comments: Comment[]
componentHierarchy: Record<string, ComponentNode>
componentConfigs: Record<string, ComponentConfig>
godCredentialsExpiry: number