(params martini.Params)
| 234 | } |
| 235 | |
| 236 | func (s *apiServer) CreateProxy(params martini.Params) (int, string) { |
| 237 | if err := s.verifyXAuth(params); err != nil { |
| 238 | return rpc.ApiResponseError(err) |
| 239 | } |
| 240 | addr, err := s.parseAddr(params) |
| 241 | if err != nil { |
| 242 | return rpc.ApiResponseError(err) |
| 243 | } |
| 244 | if err := s.topom.CreateProxy(addr); err != nil { |
| 245 | return rpc.ApiResponseError(err) |
| 246 | } else { |
| 247 | return rpc.ApiResponseJson("OK") |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | func (s *apiServer) OnlineProxy(params martini.Params) (int, string) { |
| 252 | if err := s.verifyXAuth(params); err != nil { |
nothing calls this directly
no test coverage detected