mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-01-03 20:52:25 +00:00
fix bug with empty result and non table result
This commit is contained in:
@@ -25,6 +25,12 @@ func NewError(code int, message string, data any, id *json.RawMessage) *RPCRespo
|
||||
}
|
||||
|
||||
func NewResponse(result any, id *json.RawMessage) *RPCResponse {
|
||||
if result == nil {
|
||||
return &RPCResponse{
|
||||
JSONRPC: JSONRPCVersion,
|
||||
ID: id,
|
||||
}
|
||||
}
|
||||
return &RPCResponse{
|
||||
JSONRPC: JSONRPCVersion,
|
||||
ID: id,
|
||||
|
||||
Reference in New Issue
Block a user