Adding RemTP api file

This commit is contained in:
DanB
2014-10-12 13:57:29 +02:00
parent 0ea14cb4b8
commit f1927bcd39

34
apier/v2/tp.go Normal file
View File

@@ -0,0 +1,34 @@
/*
Real-time Charging System for Telecom & ISP environments
Copyright (C) ITsysCOM GmbH
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package v2
import (
"fmt"
"github.com/cgrates/cgrates/utils"
)
func (self *ApierV2) RemTP(tpid string, reply *string) error {
if err := self.StorDb.RemTPData("", tpid); err != nil {
return fmt.Errorf("%s:%s", utils.ERR_SERVER_ERROR, err.Error())
} else {
*reply = "OK"
}
return nil
}