From 0d42a96787a94dcfd0d88098119c31f57c094cea Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Thu, 13 Nov 2014 17:43:46 +0800 Subject: [PATCH] =?UTF-8?q?API=E7=9B=B8=E9=97=9C=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E5=B0=8F=E5=AF=AB=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/.htaccess | 2 +- htdocs/{API => api}/v2/html/404.html | 0 htdocs/{API => api}/v2/html/index.html | 0 htdocs/{API => api}/v2/index.php | 8 ++++---- 4 files changed, 5 insertions(+), 5 deletions(-) rename htdocs/{API => api}/v2/html/404.html (100%) rename htdocs/{API => api}/v2/html/index.html (100%) rename htdocs/{API => api}/v2/index.php (92%) diff --git a/htdocs/.htaccess b/htdocs/.htaccess index 734403d..bc5ebc7 100644 --- a/htdocs/.htaccess +++ b/htdocs/.htaccess @@ -9,4 +9,4 @@ RewriteEngine On ## For API RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule (API|api)/v2/(.*)$ API/v2/index.php/$1 [L] +RewriteRule (API|api)/v2/(.*)$ api/v2/index.php/$1 [L] diff --git a/htdocs/API/v2/html/404.html b/htdocs/api/v2/html/404.html similarity index 100% rename from htdocs/API/v2/html/404.html rename to htdocs/api/v2/html/404.html diff --git a/htdocs/API/v2/html/index.html b/htdocs/api/v2/html/index.html similarity index 100% rename from htdocs/API/v2/html/index.html rename to htdocs/api/v2/html/index.html diff --git a/htdocs/API/v2/index.php b/htdocs/api/v2/index.php similarity index 92% rename from htdocs/API/v2/index.php rename to htdocs/api/v2/index.php index 5216b16..9219fbb 100644 --- a/htdocs/API/v2/index.php +++ b/htdocs/api/v2/index.php @@ -71,7 +71,7 @@ $app->error(function (\Exception $e) use ($app) { // 測試用 Say hello!~~~ -$app->get('/Hello/:name', function ($name) use ($app) { +$app->get('/hello/:name', function ($name) use ($app) { $app->view(new \JsonApiView()); $app->add(new \JsonApiMiddleware()); @@ -83,7 +83,7 @@ $app->get('/Hello/:name', function ($name) use ($app) { // ============================================================================ -$app->group('/Users', 'APIrequest', function () use ($app) { +$app->group('/users', 'APIrequest', function () use ($app) { // 建立帳號 $app->post('/', function () use ($app) { @@ -114,13 +114,13 @@ $app->group('/Users', 'APIrequest', function () use ($app) { }); - $app->post('/:user_id/Login/', function ($user_id) use ($app) { + $app->post('/:user_id/login/', function ($user_id) use ($app) { // TODO: 登入 APIdisableFunc($app); }); }); -$app->group('/UTokens', 'APIrequest', function () use ($app) { +$app->group('/tokens', 'APIrequest', function () use ($app) { $app->get('/:token', function ($token) { //echo "Login Token: $token";