mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-17 06:09:53 +05:00
renamed Param to params
This commit is contained in:
@@ -9,4 +9,4 @@ TOPUP_DATA_r,*topup,,,,*monetary,*out,,DATA_DEST,,,*unlimited,,5000000,10,false,
|
||||
TOPUP_DATA_r,*topup,,,,*data,*out,,DATA_DEST,datar,,*unlimited,,50000000000,10,false,false,10
|
||||
TOPUP_VOICE,*topup,,,,*voice,*out,,GERMANY_MOBILE,,,*unlimited,,50000,10,false,false,10
|
||||
TOPUP_NEG,*topup,,,,*voice,*out,,GERMANY;!GERMANY_MOBILE,*zero1m,,*unlimited,,100,10,false,false,10
|
||||
RPC,*cgr_rpc,"{""Address"": ""localhost:2013"",""Transport"":""*gob"",""Method"":""ApierV2.SetAccount"",""Attempts"":1,""Async"" :false,""Param"":{""Account"":""rpc"",""Tenant"":""cgrates.org""}}",,,,,,,,,,,,,,,
|
||||
RPC,*cgr_rpc,"{""Address"": ""localhost:2013"",""Transport"":""*gob"",""Method"":""ApierV2.SetAccount"",""Attempts"":1,""Async"" :false,""Params"":{""Account"":""rpc"",""Tenant"":""cgrates.org""}}",,,,,,,,,,,,,,,
|
||||
|
||||
|
@@ -657,7 +657,7 @@ type RPCRequest struct {
|
||||
Method string
|
||||
Attempts int
|
||||
Async bool
|
||||
Param map[string]interface{}
|
||||
Params map[string]interface{}
|
||||
}
|
||||
|
||||
func cgrRPCAction(account *Account, sq *StatsQueueTriggered, a *Action, acs Actions) error {
|
||||
@@ -678,7 +678,7 @@ func cgrRPCAction(account *Account, sq *StatsQueueTriggered, a *Action, acs Acti
|
||||
client = params.Object.(rpcclient.RpcClientConnection)
|
||||
}
|
||||
in, out := params.InParam, params.OutParam
|
||||
p, err := utils.FromMapStringInterfaceValue(req.Param, in)
|
||||
p, err := utils.FromMapStringInterfaceValue(req.Params, in)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -2212,7 +2212,7 @@ func TestCgrRpcAction(t *testing.T) {
|
||||
"Method": "TestRPCParameters.Hopa",
|
||||
"Attempts":1,
|
||||
"Async" :false,
|
||||
"Param": {"Name":"n", "Surname":"s", "Age":10.2}}`,
|
||||
"Params": {"Name":"n", "Surname":"s", "Age":10.2}}`,
|
||||
}
|
||||
if err := cgrRPCAction(nil, nil, a, nil); err != nil {
|
||||
t.Error("error executing cgr action: ", err)
|
||||
|
||||
Reference in New Issue
Block a user