change sv1's Handle method

This commit is contained in:
2025-07-29 11:28:04 +03:00
parent 86cdc9adf2
commit bf5e136dc9

View File

@@ -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) {