From 3ba51c5390b8ff6c2a637a77dd3dc182a0a98f30 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Thu, 21 Jul 2016 10:16:36 +0200 Subject: [PATCH] Improved visits REST endpoint path --- data/docs/rest.md | 2 +- module/Rest/config/routes.config.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/docs/rest.md b/data/docs/rest.md index d006c6c5..09147518 100644 --- a/data/docs/rest.md +++ b/data/docs/rest.md @@ -222,7 +222,7 @@ Posible errors: **REQUEST** -* `GET` -> `/rest/visits/{shortCode}` +* `GET` -> `/rest/short-codes/{shortCode}/visits` * Route params: * shortCode: `string` -> The shortCode from which we eant to get the visits. * Query params: diff --git a/module/Rest/config/routes.config.php b/module/Rest/config/routes.config.php index e8abb6fe..24226840 100644 --- a/module/Rest/config/routes.config.php +++ b/module/Rest/config/routes.config.php @@ -30,7 +30,7 @@ return [ ], [ 'name' => 'rest-get-visits', - 'path' => '/rest/visits/{shortCode}', + 'path' => '/rest/short-codes/{shortCode}/visits', 'middleware' => Action\GetVisitsMiddleware::class, 'allowed_methods' => ['GET', 'OPTIONS'], ],