-
Notifications
You must be signed in to change notification settings - Fork 207
/
rest.go
37 lines (30 loc) · 976 Bytes
/
rest.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package rest
/* legacy, removed next version */
import (
"log"
"net/http"
"github.com/cosmos/cosmos-sdk/client"
govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest"
)
func PlansAddProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler {
return govrest.ProposalRESTHandler{
SubRoute: "plans_add",
Handler: postPlansAddProposalHandlerFn(clientCtx),
}
}
func postPlansAddProposalHandlerFn(clientCtx client.Context) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
log.Println("postPlansAddProposalHandlerFn")
}
}
func PlansDelProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler {
return govrest.ProposalRESTHandler{
SubRoute: "plans_del",
Handler: postPlansDelProposalHandlerFn(clientCtx),
}
}
func postPlansDelProposalHandlerFn(clientCtx client.Context) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
log.Println("postPlansDelProposalHandlerFn")
}
}