Skip to content

Commit

Permalink
update action response
Browse files Browse the repository at this point in the history
  • Loading branch information
slandymani committed Mar 26, 2024
1 parent f57c81a commit e815a01
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hasura/metadata/actions.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type Query {

action_proposals_statistics(
height: Int
): ActionModuleProposalsStatistics
): [ActionProposalStatus]

action_account_balance(
address: String!
Expand Down
2 changes: 1 addition & 1 deletion hasura/metadata/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ actions:
definition:
kind: synchronous
handler: "{{ACTION_BASE_URL}}/proposals_statistics"
output_type: ActionModuleProposalsStatistics
output_type: "[ActionProposalStatus]"
arguments:
type: query
headers:
Expand Down
4 changes: 2 additions & 2 deletions modules/actions/handlers/vote_proposals_statistics.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
)

type proposalStatistics struct {
Status string `db:"status"`
Count uint64 `db:"count"`
Status string `db:"status" json:"status"`
Count uint64 `db:"count" json:"count"`
}

func GetVoteProposalsStatistics(ctx *types.Context, payload *types.Payload, db *database.Db) (interface{}, error) {
Expand Down

0 comments on commit e815a01

Please sign in to comment.