From 8df256fb8d4671182306364abcbc58a454bad7bb Mon Sep 17 00:00:00 2001 From: Radu Ioan Fericean Date: Tue, 21 Oct 2014 13:54:44 +0300 Subject: [PATCH] converted string param to struct --- apier/v2/tp.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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"