2019-04-24 18:46:41 +00: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.
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
$router->get('/', ['middleware' => 'gui', 'uses' => 'GUI\PublicController@index']);
|
|
|
|
$router->get('/api/v4/user', ['uses' => 'oAuthController@getUserTMP']);
|
|
|
|
$router->get('/api/v4/groups', ['uses' => 'oAuthController@getGroupsTMP']);
|
|
|
|
|
|
|
|
|
|
|
|
$router->group(['prefix' => 'gui', 'middleware' => 'gui'], function () use ($router) {
|
|
|
|
$router->get('/register', ['uses' => 'GUI\AccountController@registerView']);
|
|
|
|
$router->post('/register', ['uses' => 'GUI\AccountController@register']);
|
|
|
|
|
|
|
|
$router->get('/invite', ['uses' => 'GUI\AccountController@inviteView']);
|
|
|
|
|
|
|
|
$router->get('/login', ['uses' => 'GUI\AccountController@loginView']);
|
|
|
|
$router->get('/logout', ['uses' => 'GUI\AccountController@logout']);
|
|
|
|
$router->post('/login', ['uses' => 'GUI\AccountController@login']);
|
|
|
|
$router->get('/apps', ['uses' => 'GUI\AppController@appList']);
|
|
|
|
$router->get('/apps/new', ['uses' => 'GUI\AppController@newAppView']);
|
|
|
|
$router->post('/apps/new', ['uses' => 'GUI\AppController@newApp']);
|
|
|
|
$router->get('/apps/{id}', ['uses' => 'GUI\AppController@viewApp']);
|
2019-04-25 10:03:34 +00:00
|
|
|
$router->post('/apps/{id}', ['uses' => 'GUI\AppController@updateApp']);
|
2019-04-24 18:46:41 +00:00
|
|
|
$router->post('/apps/{id}/changeIcon', ['uses' => 'GUI\AppController@changeIcon']);
|
|
|
|
$router->get('/apps/{id}/icon', ['uses' => 'GUI\AppController@getAppIcon']);
|
|
|
|
$router->get("/mailValidation/{id}/{code}", ['uses' => 'GUI\AccountController@validateEMail']);
|
|
|
|
|
|
|
|
|
|
|
|
//Admin
|
|
|
|
$router->get("/admin/mails", ['uses' => 'GUI\AdminController@listMails']);
|
|
|
|
$router->get("/admin/settings", ['uses' => 'GUI\AdminController@settingsView']);
|
|
|
|
$router->post("/admin/settings", ["uses" => "GUI\AdminController@saveSettings"]);
|
|
|
|
$router->get("/admin/apps", ["uses" => "GUI\AdminController@appList"]);
|
|
|
|
$router->get("/admin/apps/{id}", ["uses" => "GUI\AdminController@appDetails"]);
|
|
|
|
$router->post("/admin/apps/{id}", ["uses" => "GUI\AdminController@appDetailsSave"]);
|
|
|
|
$router->get("/admin/invites", ["uses" => "GUI\AdminController@inviteView"]);
|
|
|
|
$router->get("/admin/invites/new", ["uses" => "GUI\AdminController@inviteNewView"]);
|
|
|
|
$router->post("/admin/invites/new", ["uses" => "GUI\AdminController@inviteNew"]);
|
|
|
|
|
|
|
|
$router->get('user/profile', function () {
|
|
|
|
// Uses Auth Middleware
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
/*$router->group(['prefix' => 'api'], function () use ($router) {
|
|
|
|
$router->group(['prefix' => 'auth'], function () use ($router) {
|
|
|
|
$router->post('/register', ['uses' => 'GUI\AccountController@register']);
|
|
|
|
});
|
|
|
|
});*/
|
|
|
|
|
|
|
|
|
|
|
|
$router->group(['prefix' => 'oauth'], function () use ($router) {
|
|
|
|
$router->get("/authorize", ['middleware' => 'gui', 'uses' => 'oAuthController@authorizeView']);
|
|
|
|
$router->post("/authorize", ['middleware' => 'gui', 'uses' => 'oAuthController@authorizeDo']);
|
|
|
|
$router->post("/token", ['uses' => 'oAuthController@token']);
|
|
|
|
});
|