From 418bf8b140d3d956873a7ca0ea9f3a9014394a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 21 Jan 2014 21:28:54 +0100 Subject: [PATCH] [change] route for post a new URL --- app/controllers/api.php | 2 +- tests/functionals/ApiTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api.php b/app/controllers/api.php index 2746177..82be0bd 100644 --- a/app/controllers/api.php +++ b/app/controllers/api.php @@ -18,7 +18,7 @@ $api->get('/entries', function () use ($app) { return $app->json($entries, 200); }); -$api->post('/entries', function (Request $request) use ($app) { +$api->post('/add', function (Request $request) use ($app) { $url = $request->request->get('url'); $entry = $app['entry_api']->createEntryFromUrl($url); diff --git a/tests/functionals/ApiTest.php b/tests/functionals/ApiTest.php index d9134d1..9c562e6 100644 --- a/tests/functionals/ApiTest.php +++ b/tests/functionals/ApiTest.php @@ -270,7 +270,7 @@ class ApiTest extends PocheWebTestCase $client = $this->createClient(); $crawler = $client->request( 'POST', - '/api/entries', + '/api/add', array(), array(), array('CONTENT_TYPE' => 'application/json'),