Skip to content

Commit

Permalink
add twin_id as a param in the consumption endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Omarabdul3ziz committed Nov 10, 2024
1 parent 109d825 commit 5c909e9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions grid-proxy/docs/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions grid-proxy/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,14 @@
"TwinConsumption"
],
"summary": "Show a report for user consumption",
"parameters": [
{
"type": "integer",
"description": "twin id",
"name": "twin_id",
"in": "path"
}
],
"responses": {
"200": {
"description": "OK",
Expand Down
5 changes: 5 additions & 0 deletions grid-proxy/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1512,6 +1512,11 @@ paths:
consumes:
- application/json
description: Get a report of user spent for last hour and for lifetime
parameters:
- description: twin id
in: path
name: twin_id
type: integer
produces:
- application/json
responses:
Expand Down
1 change: 1 addition & 0 deletions grid-proxy/internal/explorer/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ func (a *App) listTwins(r *http.Request) (interface{}, mw.Response) {
// @Summary Show a report for user consumption
// @Description Get a report of user spent for last hour and for lifetime
// @Tags TwinConsumption
// @Param twin_id path int yes "twin id"
// @Accept json
// @Produce json
// @Success 200 {object} []types.TwinConsumption
Expand Down

0 comments on commit 5c909e9

Please sign in to comment.