diff --git a/apier/v2/tp.go b/apier/v2/tp.go index 895e612d0..187abfa34 100644 --- a/apier/v2/tp.go +++ b/apier/v2/tp.go @@ -26,11 +26,15 @@ import ( "github.com/cgrates/cgrates/utils" ) -func (self *ApierV2) RemTP(tpid string, reply *string) error { - if len(tpid) == 0 { +type AttrRemTp struct { + TPid string +} + +func (self *ApierV2) RemTP(attrs AttrRemTp, reply *string) error { + if len(attrs.TPid) == 0 { return fmt.Errorf("%s:TPid", utils.ERR_MANDATORY_IE_MISSING) } - if err := self.StorDb.RemTPData("", tpid); err != nil { + if err := self.StorDb.RemTPData("", attrs.TPid); err != nil { return fmt.Errorf("%s:%s", utils.ERR_SERVER_ERROR, err.Error()) } else { *reply = "OK"