(params martini.Params)
| 298 | } |
| 299 | |
| 300 | func (s *apiServer) CreateGroup(params martini.Params) (int, string) { |
| 301 | if err := s.verifyXAuth(params); err != nil { |
| 302 | return rpc.ApiResponseError(err) |
| 303 | } |
| 304 | gid, err := s.parseInteger(params, "gid") |
| 305 | if err != nil { |
| 306 | return rpc.ApiResponseError(err) |
| 307 | } |
| 308 | if err := s.topom.CreateGroup(gid); err != nil { |
| 309 | return rpc.ApiResponseError(err) |
| 310 | } else { |
| 311 | return rpc.ApiResponseJson("OK") |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | func (s *apiServer) RemoveGroup(params martini.Params) (int, string) { |
| 316 | if err := s.verifyXAuth(params); err != nil { |
nothing calls this directly
no test coverage detected