Files
sim/lib/logging.ts
waleedlatif1 f52de5d1d6 Feature/api (#82)
* my test changes for branch protection

* feat(api): introduced 'deploy as an API' button and updated workflows db to include status of deployment

* feat(api): added 'trigger' column for logs table to indicate source of workflow run, persist logs from API executions, removed session validation in favor of API key

* fix(bug): cleanup old reference to JSX element in favor of ReactElement

* feat(api): added persistent notification for one-click deployment with copy boxes for url, keys, & ex curl

* fix(ui/notifications): cleaned up deploy with one-click button ui
2025-02-23 13:46:50 -08:00

18 lines
344 B
TypeScript

import { db } from '@/db'
import { workflowLogs } from '@/db/schema'
export interface LogEntry {
id: string
workflowId: string
executionId: string
level: string
message: string
createdAt: Date
duration?: string
trigger?: string
}
export async function persistLog(log: LogEntry) {
await db.insert(workflowLogs).values(log)
}