From 05edaae8be37ae44b10a548ba78201b168cb25d6 Mon Sep 17 00:00:00 2001 From: nidhi-singh02 Date: Sun, 8 Sep 2024 12:58:33 +0530 Subject: [PATCH] request type changes - cleanup Signed-off-by: nidhi-singh02 --- mod/node-api/handlers/beacon/historical.go | 1 - mod/node-api/handlers/beacon/types/request.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mod/node-api/handlers/beacon/historical.go b/mod/node-api/handlers/beacon/historical.go index 02fbe002e5..df60ce3570 100644 --- a/mod/node-api/handlers/beacon/historical.go +++ b/mod/node-api/handlers/beacon/historical.go @@ -100,7 +100,6 @@ func convertToFork[T any](forkGeneric T) (*consensustypes.Fork, error) { return nil, errors.Wrapf(errors.New( "type assertion failed", ), "unexpected fork type: %T", forkGeneric) - } return fork, nil } diff --git a/mod/node-api/handlers/beacon/types/request.go b/mod/node-api/handlers/beacon/types/request.go index 4a5a503400..fe60f7b48d 100644 --- a/mod/node-api/handlers/beacon/types/request.go +++ b/mod/node-api/handlers/beacon/types/request.go @@ -45,7 +45,7 @@ type GetStateValidatorsRequest struct { type PostStateValidatorsRequest struct { types.StateIDRequest IDs []string `json:"ids" validate:"dive,validator_id"` - Statuses []string `json:"statuses" validate:"omitempty,dive,validator_status"` + Statuses []string `json:"statuses" validate:"dive,validator_status"` } type GetStateValidatorRequest struct { @@ -60,7 +60,7 @@ type GetValidatorBalancesRequest struct { type PostValidatorBalancesRequest struct { types.StateIDRequest - IDs []string `json:"-"` + IDs []string `json:"-" validate:"dive,validator_id"` } type GetStateCommitteesRequest struct {