Skip to content

Commit

Permalink
fixing role issue when updating admin info
Browse files Browse the repository at this point in the history
  • Loading branch information
ImperFecti committed Jul 31, 2024
1 parent 2e9a202 commit 6a8c1e6
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions app/Config/Routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@
* @var RouteCollection $routes
*/

// Route untuk halaman utama
// Route untuk konten halaman utama
$routes->get('/', 'Home::index');

// Route untuk halaman harga
$routes->get('/price', 'Home::harga');

// Route untuk halaman kalkulator
$routes->get('/kalkulator', 'Home::kalkulator');


Expand All @@ -30,15 +26,17 @@



// Route untuk halaman profil pelanggan
$routes->get('/profile', 'Pelanggan::profile', ['filter' => 'role:pelanggan']);
$routes->get('/ubahpassword', 'Pelanggan::ubahpassword', ['filter' => 'role:pelanggan']);
$routes->post('/updatepassword/(:num)', 'Pelanggan::updatepassword/$1', ['filter' => 'role:pelanggan']);
// Route untuk halaman profil pelanggan/admin
$routes->get('/profile', 'Pelanggan::profile');
$routes->get('/ubahpassword', 'Pelanggan::ubahpassword');
$routes->post('/updatepassword/(:num)', 'Pelanggan::updatepassword/$1');

// Route untuk halaman edit profil pelanggan/admin
$routes->get('/editprofile', 'Pelanggan::editprofile');
$routes->post('/updateprofile/(:num)', 'Pelanggan::updateprofile/$1');

// Route untuk halaman edit profil pelanggan
$routes->get('/editprofile', 'Pelanggan::editprofile', ['filter' => 'role:pelanggan']);
$routes->post('/updateprofile/(:num)', 'Pelanggan::updateprofile/$1', ['filter' => 'role:pelanggan']);

// Route untuk halaman pembayaran listrik (dengan filter role pelanggan)
$routes->get('/bayarlistrik', 'Pelanggan::bayarlistrik', ['filter' => 'role:pelanggan']);
// Update route untuk pembayaran listrik
$routes->post('/bayar/(:num)', 'Pelanggan::bayar/$1', ['filter' => 'role:pelanggan']);
Expand Down

0 comments on commit 6a8c1e6

Please sign in to comment.