diff --git a/handlers.go b/handlers.go index be60509..b904b68 100644 --- a/handlers.go +++ b/handlers.go @@ -70,8 +70,10 @@ func (f *faucet) registerHandlers(api *apirest.API) { // Returns the list of supported auth types func (f *faucet) authTypesHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext) error { data := &AuthTypes{ - AuthTypes: f.authTypes, + AuthTypes: f.authTypes, + WaitSeconds: uint64(f.waitPeriod.Seconds()), } + return ctx.Send(new(HandlerResponse).Set(data).MustMarshall(), apirest.HTTPstatusOK) } diff --git a/types.go b/types.go index cad2b32..f0816e6 100644 --- a/types.go +++ b/types.go @@ -4,7 +4,8 @@ import "fmt" // AuthTypes is a struct to return the supported authentication types. type AuthTypes struct { - AuthTypes map[string]uint64 `json:"auth"` + AuthTypes map[string]uint64 `json:"auth"` + WaitSeconds uint64 `json:"waitSeconds"` } var errAddressAlreadyFunded = fmt.Errorf("address already funded")