Repository navigation
add endpoints for acme energy consumption - #299
Conversation
| (req) => ['energy-consumption', req.query.start, req.query.end], | ||
| ENDPOINTS.ENERGY_CONSUMPTION, | ||
| getEnergyConsumption, | ||
| [AUTH_PERMISSIONS.ELECTRICITY] |
There was a problem hiding this comment.
please use AUTH_PERMISSIONS.POWERMETER
| method: HTTP_METHODS.POST, | ||
| url: ENDPOINTS.ENERGY_CONSUMPTION, | ||
| preValidation: rejectTimezone(), | ||
| ...createAuthRoute(ctx, saveEnergyConsumption, [AUTH_PERMISSIONS.ELECTRICITY]), |
There was a problem hiding this comment.
please use AUTH_PERMISSIONS.POWERMETER
|
Cross-checked this against the ACME spec and the FE plan while building the hashrate side (#301). Three things worth deciding before this merges:
|
Since the CSV parsing is handled by the FE, it is expected to fetch the 3 component values first and then respond with the updated manual entry. Also the fetch is needed anyway to determine if the value should be overwritten as per this agreed upon logic:
|
…e into feat/hourly-consumption

Ticket