diff options
Diffstat (limited to 'public/app/routes')
| -rw-r--r-- | public/app/routes/backend.php | 52 | ||||
| -rw-r--r-- | public/app/routes/frontend.php | 4 | ||||
| -rw-r--r-- | public/app/routes/user.php | 15 |
3 files changed, 13 insertions, 58 deletions
diff --git a/public/app/routes/backend.php b/public/app/routes/backend.php index 027c50a..1290f8a 100644 --- a/public/app/routes/backend.php +++ b/public/app/routes/backend.php @@ -31,58 +31,6 @@ Route::add('/admin/panel', function () { // admin panel #2 }); -// admin categories (=courses) -//////////////////////////////////////////////////////////////////////////////// - - -Route::add('/admin/categories', function () { // manage categories page - Auth::allowRoles([1, 2, 3]); - Render::view('admin/skeleton', [ - 'title' => 'Διαχείριση Κεφαλαίων', - 'action' => 'categories', - ]); -}); - -Route::add('/admin/api/categories', function () { // ajax: get all courses; with breadcrumbs - Auth::allowRoles([1, 2, 3]); // allow few admin-panel roles - CmsAdmin::breadcrumbs(); -}); - -Route::add('/admin/api/categories/add', function () { // ajax: add new category (course) - Auth::allowRoles([1, 2, 3]); - CmsAdmin::add_course(); -}, 'post'); - -Route::add('/admin/api/categories/update', function () { // ajax: edit category (course) - Auth::allowRoles([1, 2, 3]); // allow few admin-panel roles - CmsAdmin::update_course(); -}, -'post'); - - -// admin privileges -//////////////////////////////////////////////////////////////////////////////// - - -Route::add('/admin/privileges', function () { // manage privileges page - Auth::allowRoles([1, 2, 3]); - Render::view('admin/skeleton', [ - 'title' => 'Διαχείριση Δικαιωμάτων Πρόσβασης', - 'action' => 'privileges', - ]); -}); - -// ajax: get all privileges (courses; with breadcrumbs) -// use proxy (cache results); send as json -Route::add('/admin/api/privileges', function () { - Auth::allowRoles([1, 2, 3]); // allow few admin-panel roles - Render::json( Cache_service::privileges_hierarchy() ); -}); - -// add privilege - -// update privilege - // admin lessons diff --git a/public/app/routes/frontend.php b/public/app/routes/frontend.php index 2112537..2defce5 100644 --- a/public/app/routes/frontend.php +++ b/public/app/routes/frontend.php @@ -9,8 +9,10 @@ use app\extends\Cache_service; // Home/Welcome //////////////////////////////////////////////////////////////////////////////// -Route::add('/', function() { Render::view('welcome'); }); +// Route::add('/', function() { Render::view('welcome'); }); +Route::add('/', function() { Render::view('user/registration'); }); +Route::add('/penalty', function() { Render::view('templates/penalty'); }); // Error pages //////////////////////////////////////////////////////////////////////////////// diff --git a/public/app/routes/user.php b/public/app/routes/user.php index 7ad0fa6..146b212 100644 --- a/public/app/routes/user.php +++ b/public/app/routes/user.php @@ -29,6 +29,13 @@ Route::add('/account/activate', function() { Auth::activate(); } ); Route::add('/account/reset_password', function() { Auth::reset_password(); } ); +// invite +Route::add('/invite', function() { + Auth::allowRoles([1, 2, 3]); + Render::view('admin/invite'); +}); + + // Replies to common requests (POST method) // --- -- -- - - - @@ -43,11 +50,9 @@ Route::add('/account/check-login', function() { // user sends a registration form Route::add('/account/register', function() { - $response = Auth::register(); - Render::json($response); - }, - 'post' -); + $response = Auth::register(); + Render::json($response); +},'post'); // Account Management |
