public function ping(\SS_HTTPRequest $request)
{
if (!$this->record->canView($this->getMember())) {
return $this->message('You are not authorized to do that on this environment', 403);
}
switch ($request->httpMethod()) {
case 'GET':
return $this->getPing($this->getRequest()->param('ID'));
case 'POST':
return $this->createPing();
default:
return $this->message('API not found', 404);
}
}