1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-11-14 22:22:32 +01:00
polr/app/Http/routes.php

39 lines
1.6 KiB
PHP
Raw Normal View History

2015-11-03 05:13:32 +01:00
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/
/* GET endpoints */
$app->get('/', ['as' => 'index', 'uses' => 'IndexController@showIndexPage']);
$app->get('/logout', ['as' => 'logout', 'uses' => 'UserController@logoutUser']);
$app->get('/login', ['as' => 'login', 'uses' => 'UserController@displayLoginPage']);
$app->get('/about', ['as' => 'about', 'uses' => 'StaticPageController@displayAbout']);
$app->get('/signup', ['as' => 'signup', 'uses' => 'UserController@displaySignupPage']);
$app->get('/admin', ['as' => 'admin', 'uses' => 'AdminController@displayAdminPage']);
2015-11-07 00:47:57 +01:00
$app->get('/setup', ['as' => 'setup', 'uses' => 'SetupController@displaySetupPage']);
2015-12-12 05:34:34 +01:00
$app->post('/setup', ['as' => 'psetup', 'uses' => 'SetupController@performSetup']);
2015-11-07 00:47:57 +01:00
$app->get('/{short_url}', ['uses' => 'LinkController@performRedirect']);
$app->get('/{short_url}/{secret_key}', ['uses' => 'LinkController@performRedirect']);
/* POST endpoints */
$app->post('/login', ['as' => 'plogin', 'uses' => 'UserController@performLogin']);
$app->post('/signup', ['as' => 'psignup', 'uses' => 'UserController@performSignup']);
2015-11-06 00:16:55 +01:00
$app->post('/shorten', ['as' => 'shorten', 'uses' => 'LinkController@performShorten']);
2015-11-07 02:25:48 +01:00
/* API endpoints */
$app->post('/api/v2/link_avail_check', ['as' => 'link_check', 'uses' => 'AjaxController@checkLinkAvailability']);