refactor(api-server): move work-graph SQL into db domain methods
Replace six inline queryAll calls in routes-work-graph.ts with domain methods. db.entityCrud gains listGoals, getGoalForUpdate, listProjects, getProjectForUpdate. db.knowledge gains listSprints. db.company gains getDashboardSnapshot, which returns the raw agent/task/activity rows the dashboard handler aggregates. The route-level row shapes are preserved in the new GoalListRow / ProjectListRow / SprintListRow types so HTTP responses remain identical.
This commit is contained in:
1 parent
2be1bd1612
commit
efb9fdb8cc
6 files changed
+162
-60
No files matched your search
@@ -190,6 +190,7 @@ export class AppDatabaseBase {
|
||||
getInbox(companyId: string) { return this.company.getInbox(companyId); }
|
||||
getCompanyMetrics(companyId: string, days: number = 30) { return this.company.getCompanyMetrics(companyId, days); }
|
||||
getStandupReport(companyId: string) { return this.company.getStandupReport(companyId); }
|
||||
getDashboardSnapshot(companyId: string) { return this.company.getDashboardSnapshot(companyId); }
|
||||
|
||||
// ─── Connectors ────────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in new issue
Block a user