mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-01-03 19:32:26 +00:00
change sv1's Handle method
This commit is contained in:
@@ -6,12 +6,8 @@ import (
|
|||||||
"github.com/akyaiy/GoSally-mvp/internal/server/rpc"
|
"github.com/akyaiy/GoSally-mvp/internal/server/rpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (h *HandlerV1) Handle(w http.ResponseWriter, r *http.Request, req rpc.RPCRequest) {
|
func (h *HandlerV1) Handle(r *http.Request, req *rpc.RPCRequest) *rpc.RPCResponse {
|
||||||
rpc.WriteResponse(w, &rpc.RPCResponse{
|
return rpc.NewResponse("Hi", req.ID) // test answer to make sure everything works
|
||||||
JSONRPC: rpc.JSONRPCVersion,
|
|
||||||
ID: req.ID,
|
|
||||||
Result: "Hi",
|
|
||||||
}) // test answer to make sure everything works
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// func (h *HandlerV1) Handle(w http.ResponseWriter, r *http.Request) {
|
// func (h *HandlerV1) Handle(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
Reference in New Issue
Block a user