summaryrefslogtreecommitdiff
path: root/public/app/routes/user.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/app/routes/user.php')
-rw-r--r--public/app/routes/user.php43
1 files changed, 35 insertions, 8 deletions
diff --git a/public/app/routes/user.php b/public/app/routes/user.php
index 2ecd3c1..e43eaa9 100644
--- a/public/app/routes/user.php
+++ b/public/app/routes/user.php
@@ -27,9 +27,9 @@ Route::add('/logout', function() {
});
-
-// request password reset
-Route::add('/account/reset_password', function() { Auth::reset_password(); } );
+// TODO:
+// // request password reset
+// Route::add('/account/reset_password', function() { Auth::reset_password(); } );
// Replies to common requests (POST method)
@@ -122,19 +122,34 @@ if (Auth::is_connected()) {
// UPDATE user properties
// -------------------------------------------------------------------------
- // request UPDADE FORM
+ // GET HTML: request UPDADE (properties) FORM
// --- -- -- - - -
Route::add('/user/update_form', function() {
Auth::update_form();
});
- // update user (data via post)
+ // POST: update user (data via post)
// --- -- -- - - -
- Route::add('/user/update_properties', function() {
+ Route::add('/user/update/properties', function() {
Auth::update_user();
}, 'post');
+ // GET HTML: request (update) PASSWORD FORM
+ // --- -- -- - - -
+ Route::add('/user/password_form', function() {
+ Auth::password_form();
+ });
+
+ // POST: update user (data via post)
+ // --- -- -- - - -
+ Route::add('/user/update/password', function() {
+ Auth::update_password();
+ }, 'post');
+
+
+
+
// CRUD content
// -------------------------------------------------------------------------
@@ -154,12 +169,24 @@ if (Auth::is_connected()) {
if (Auth::in_admin_group()) {
- // administer petitions
+ // GET HTML: administer petitions (page)
// --- -- -- - - -
Route::add('/admin/petitions', function() {
- Render::view('user/panel');
+ Render::view('templates/admin_petitions');
+ });
+
+
+ // GET JSON: request RESULTS list my petitions
+ Route::add('/admin/get/petitions', function() {
+ Office::all_petitions();
});
+
+ // POST AJAX: set petition protocol
+ Route::add('/admin/set/protocol', function() {
+ Office::set_protocol();
+ }, 'post');
+
// invite user(s)
// --- -- -- - - -
Route::add('/admin/invite', function() {