Add dashboard widget endpoint: Implemented getDashboardWidget method in FalukantService and updated router to provide compact user data for the dashboard widget, ensuring frontend compatibility.

This commit is contained in:
Torsten Schulz (local)
2026-02-09 15:05:17 +01:00
parent 83455f1e83
commit c8d8254fc1
3 changed files with 59 additions and 2 deletions

View File

@@ -26,6 +26,8 @@ class FalukantController {
}, { successStatus: 201 });
this.getInfo = this._wrapWithUser((userId) => this.service.getInfo(userId));
// Dashboard widget: originaler Endpoint (siehe Commit 62d8cd7)
this.getDashboardWidget = this._wrapWithUser((userId) => this.service.getDashboardWidget(userId));
this.getBranches = this._wrapWithUser((userId) => this.service.getBranches(userId));
this.createBranch = this._wrapWithUser((userId, req) => this.service.createBranch(userId, req.body.cityId, req.body.branchTypeId));
this.getBranchTypes = this._wrapWithUser((userId) => this.service.getBranchTypes(userId));