feat: Runtime configuration and Docker deployment improvements
Frontend: - Add runtime configuration service for deployment-time API URL injection - Create docker-entrypoint.sh to generate config.json from environment variables - Update ApiService, ApprovalService, and DocumentViewer to use RuntimeConfigService - Add APP_INITIALIZER to load runtime config before app starts Backend: - Fix init-blockchain.js to properly quote mnemonic phrases in .env file - Improve docker-entrypoint.sh with health checks and better error handling Docker: - Add API_BASE_URL environment variable to frontend container - Update docker-compose.yml with clear documentation for remote deployment - Reorganize .env.example with clear categories (REQUIRED FOR REMOTE, PRODUCTION, AUTO-GENERATED) Workflow fixes: - Fix DepartmentApproval interface to match backend schema - Fix stage transformation for 0-indexed stageOrder - Fix workflow list to show correct stage count from definition.stages Cleanup: - Move development artifacts to .trash directory - Remove root-level package.json (was only for utility scripts) - Add .trash/ to .gitignore
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { QueryBuilder } from 'objection';
|
||||
|
||||
export interface PaginatedResult<T> {
|
||||
results: T[];
|
||||
data: T[];
|
||||
total: number;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export async function paginate<T>(
|
||||
const l = limit > 0 ? limit : 10;
|
||||
|
||||
const { results, total } = await query.page(p, l);
|
||||
return { results, total };
|
||||
return { data: results, total };
|
||||
}
|
||||
|
||||
export { QueryBuilder };
|
||||
export { QueryBuilder };
|
||||
|
||||
Reference in New Issue
Block a user