(params martini.Params)
| 384 | } |
| 385 | |
| 386 | func (s *apiServer) GroupDelServer(params martini.Params) (int, string) { |
| 387 | if err := s.verifyXAuth(params); err != nil { |
| 388 | return rpc.ApiResponseError(err) |
| 389 | } |
| 390 | gid, err := s.parseInteger(params, "gid") |
| 391 | if err != nil { |
| 392 | return rpc.ApiResponseError(err) |
| 393 | } |
| 394 | addr, err := s.parseAddr(params) |
| 395 | if err != nil { |
| 396 | return rpc.ApiResponseError(err) |
| 397 | } |
| 398 | if err := s.topom.GroupDelServer(gid, addr); err != nil { |
| 399 | return rpc.ApiResponseError(err) |
| 400 | } else { |
| 401 | return rpc.ApiResponseJson("OK") |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | func (s *apiServer) GroupPromoteServer(params martini.Params) (int, string) { |
| 406 | if err := s.verifyXAuth(params); err != nil { |
nothing calls this directly
no test coverage detected