MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / successResponse

Function successResponse

apps/desktop/main/api/errors.ts:117–127  ·  view source on GitHub ↗
(data: T, meta?: Record<string, unknown>)

Source from the content-addressed store, hash-verified

115}
116
117export function successResponse<T>(data: T, meta?: Record<string, unknown>) {
118 return {
119 success: true as const,
120 data,
121 meta: {
122 timestamp: Math.floor(Date.now() / 1000),
123 version: '0.0.2',
124 ...meta,
125 },
126 }
127}
128
129export function errorResponse(error: ApiError) {
130 return {

Callers 4

handleUnifiedImportFunction · 0.90
handleLegacyImportFunction · 0.90
registerSystemRoutesFunction · 0.90
registerSessionRoutesFunction · 0.90

Calls 1

nowMethod · 0.45

Tested by

no test coverage detected