data rework

This commit is contained in:
Ben Wilson
2023-08-01 22:39:02 -04:00
parent d718df88cd
commit 5dd1fa3dfa
7 changed files with 140 additions and 124 deletions
+7 -6
View File
@@ -20,12 +20,8 @@ export class ClientController {
const workers = await this.clientService.getByAddress(address);
const chartData = await this.clientStatisticsService.getChartDataForAddress(address);
const addressSettings = await this.addressSettingsService.getSettings(address);
return {
bestDifficulty: addressSettings?.bestDifficulty,
workersCount: workers.length,
@@ -39,11 +35,16 @@ export class ClientController {
startTime: worker.startTime
};
})
),
chartData
)
}
}
@Get(':address/chart')
async getClientInfoChart(@Param('address') address: string) {
const chartData = await this.clientStatisticsService.getChartDataForAddress(address);
return chartData;
}
@Get(':address/:workerName')
async getWorkerGroupInfo(@Param('address') address: string, @Param('workerName') workerName: string) {