mirror of
https://origin.cursor.com/mrdevmx/panels.git
synced 2026-10-09 15:33:17 +00:00
refactor(api): migrate main.ts CRUD routes to PostgreSQL RPC
Replace all db.prepare() calls in main.ts with callCoreFn and the respondRpc/respondApiError HTTP envelope helpers. Company and project routes use the RPC response pattern; worker, budget, badge, catalog, and tenant settings endpoints call their matching core.fn_* functions. Adds app.onError(onAppError) for consistent error handling. Keeps companies.ts wrappers, excel.ts document storage, and auth/PDF/S3 unchanged. Co-authored-by: alberto.martinez <alberto.martinez@mrdev.mx>
This commit is contained in:
parent
8717c00a83
commit
e92614acb9
1 changed files with 565 additions and 476 deletions
1041
api/main.ts
1041
api/main.ts
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue