} } break; } break; ################################################## # Comments # ################################################## ################################################## # Comments # ################################################## case 'comments': switch ($method) { case 'GET': $id = isset($_GET['id']) ? $_GET['id'] : ''; $response = $Cosmo->commentsRead($id); break; case 'POST': $content_id = isset($_POST['content_id']) ? $_POST['content_id'] : ''; $path = isset($_POST['path']) ? $_POST['path'] : ''; $name = isset($_POST['name']) ? $_POST['name'] : ''; $email = isset($_POST['email']) ? $_POST['email'] : ''; $comment = isset($_POST['comment']) ? $_POST['comment'] : ''; $response = $Cosmo->commentsCreate($content_id, $path, $name, $email, $comment); break; case 'PUT': $id = isset($_PUT['id']) ? $_PUT['id'] : ''; $comment = isset($_PUT['comment']) ? $_PUT['comment'] : ''; $response = $Cosmo->commentsUpdate($id, $comment); break; case 'DELETE':