From 39b79d8824710353b5caf5b8c18bc9f719699749 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 6 Jul 2016 22:12:48 +0200 Subject: [PATCH] Added sample API routes into the project (will be updated soon). --- src/application/config/routes.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/application/config/routes.php b/src/application/config/routes.php index feec250d..3976b677 100644 --- a/src/application/config/routes.php +++ b/src/application/config/routes.php @@ -42,5 +42,21 @@ $route['default_controller'] = "appointments"; $route['404_override'] = 'errors/error404'; +/* +| ------------------------------------------------------------------------- +| REST API ROUTING +| ------------------------------------------------------------------------- +| The following routes will point the API calls into the correct controller +| callback methods. This routes also define the HTTP verbs that they are +| used for each operation. +| +*/ + +$route['api/appointments']['get'] = 'api/appointments/get/$1'; +$route['api/appointments']['post'] = 'api/appointments/insert'; +$route['api/appointments']['put'] = 'api/appointments/update/$1'; +$route['api/appointments']['delete'] = 'api/appointments/delete/$1'; + + /* End of file routes.php */ -/* Location: ./application/config/routes.php */ \ No newline at end of file +/* Location: ./application/config/routes.php */