forked from tendermint/farming
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re: add detailed validation logics for AddRequestProposal, UpdateRequ…
…estProposal, DeleteRequestProposal
- Loading branch information
Showing
4 changed files
with
41 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package rest | ||
|
||
import ( | ||
"net/http" | ||
|
||
"github.com/cosmos/cosmos-sdk/client" | ||
govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" | ||
) | ||
|
||
// TODO: not implemented yet; although this legacy REST API may not be needed, | ||
// it needs for ProposalHandler; otherwise it throws panic when starting the chain | ||
|
||
// ProposalRESTHandler returns a ProposalRESTHandler that exposes the community pool spend REST handler with a given sub-route. | ||
func ProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { | ||
return govrest.ProposalRESTHandler{ | ||
SubRoute: "farming_plan", | ||
Handler: postProposalHandlerFn(clientCtx), | ||
} | ||
} | ||
|
||
func postProposalHandlerFn(clientCtx client.Context) http.HandlerFunc { | ||
return func(w http.ResponseWriter, r *http.Request) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters