update
This commit is contained in:
@@ -2,31 +2,24 @@
|
||||
|
||||
use Dhiva\Core\DhivaRoutes;
|
||||
|
||||
$routes->set404Override('App\Controllers\RoutesController::notfound');
|
||||
|
||||
// Dev/Health Check
|
||||
$routes->get('/', 'DevController::sukses');
|
||||
$routes->get('/sukses', 'DevController::sukses');
|
||||
$routes->get('testdb', 'TestDb::test');
|
||||
|
||||
// Authentication & Profile
|
||||
$routes->post('auth', 'SuperUserController::auth');
|
||||
$routes->get('logout', 'SuperUserController::logout');
|
||||
$routes->get('profile', 'SuperUserController::getProfile');
|
||||
$routes->post('update-profile', 'SuperUserController::updateProfile');
|
||||
$routes->post('update-password', 'SuperUserController::updatePassword');
|
||||
// API Routes Group
|
||||
$routes->group('api', function($routes) {
|
||||
// Authentication & Profile
|
||||
$routes->post('auth', 'SuperUserController::auth');
|
||||
$routes->get('logout', 'SuperUserController::logout');
|
||||
$routes->get('profile', 'SuperUserController::getProfile');
|
||||
$routes->post('update-profile', 'SuperUserController::updateProfile');
|
||||
$routes->post('update-password', 'SuperUserController::updatePassword');
|
||||
|
||||
// Personel & DRH (New Features)
|
||||
$routes->get('personel/profil', 'PersonelController::getProfil');
|
||||
$routes->get('personel/drh', 'PersonelController::getDaftarRiwayatHidup');
|
||||
$routes->post('personel/generate-link', 'PersonelController::generateEncryptedLink');
|
||||
|
||||
// Legacy / Other (Keep if needed by other components, otherwise clean up)
|
||||
// For now, I'll keep the ones the user didn't explicitly ask to remove,
|
||||
// but focused on the core requested cleanup.
|
||||
// $routes->post('auth/v2', 'SuperUserController::authV2');
|
||||
// $routes->get('getfoto', 'SuperUserController::getfoto');
|
||||
// $routes->get('token', 'SuperUserController::cekToken');
|
||||
|
||||
// Standard CRUD via DhivaRoutes (Keep for compatibility)
|
||||
DhivaRoutes::Route($routes, 'user', 'SuperUserController');
|
||||
// Personel & DRH (New Features)
|
||||
$routes->get('personel/profil', 'PersonelController::getProfil');
|
||||
$routes->get('personel/drh', 'PersonelController::getDaftarRiwayatHidup');
|
||||
$routes->post('personel/generate-link', 'PersonelController::generateEncryptedLink');
|
||||
|
||||
// Standard CRUD via DhivaRoutes (Keep for compatibility)
|
||||
DhivaRoutes::Route($routes, 'user', 'SuperUserController');
|
||||
});
|
||||
@@ -155,27 +155,28 @@ abstract class BaseController extends Controller
|
||||
public function initControllers()
|
||||
{
|
||||
$bypassed = [
|
||||
'/auth' => 'POST',
|
||||
'/auth/v2' => 'POST',
|
||||
'/user' => 'POST',
|
||||
'/user-verifications/request-otp' => 'POST',
|
||||
'/user-verifications/verification-otp-code' => 'POST',
|
||||
'/user-verifications/resend-otp-code' => 'POST',
|
||||
'/user-verifications/upload-face-photos' => 'POST',
|
||||
'/forgot-password' => 'POST',
|
||||
'/reset-password' => 'POST',
|
||||
'/pelanggaran/feedback' => 'POST',
|
||||
'/list-pelanggaran' => 'GET',
|
||||
'/pelanggaran/get-feedback-by-id' => 'POST',
|
||||
'/pencarian-pelanggaran-2' => 'POST',
|
||||
'/check-bypass-liveness' => 'GET',
|
||||
'/koperasi' => 'GET',
|
||||
'/koperasi/' => 'GET',
|
||||
'/get-distribusi-shu-mingguan/' => 'GET',
|
||||
'/get-distribusi-shu-mingguan' => 'GET',
|
||||
'/live-gold-price' => 'GET',
|
||||
'/update-profile' => 'POST',
|
||||
'/profile' => 'GET',
|
||||
'/api/auth' => 'POST',
|
||||
'/api/auth/v2' => 'POST',
|
||||
'/api/user' => 'POST',
|
||||
'/api/user-verifications/request-otp' => 'POST',
|
||||
'/api/user-verifications/verification-otp-code' => 'POST',
|
||||
'/api/user-verifications/resend-otp-code' => 'POST',
|
||||
'/api/user-verifications/upload-face-photos' => 'POST',
|
||||
'/api/forgot-password' => 'POST',
|
||||
'/api/reset-password' => 'POST',
|
||||
'/api/pelanggaran/feedback' => 'POST',
|
||||
'/api/list-pelanggaran' => 'GET',
|
||||
'/api/pelanggaran/get-feedback-by-id' => 'POST',
|
||||
'/api/pencarian-pelanggaran-2' => 'POST',
|
||||
'/api/check-bypass-liveness' => 'GET',
|
||||
'/api/koperasi' => 'GET',
|
||||
'/api/koperasi/' => 'GET',
|
||||
'/api/get-distribusi-shu-mingguan/' => 'GET',
|
||||
'/api/get-distribusi-shu-mingguan' => 'GET',
|
||||
'/api/live-gold-price' => 'GET',
|
||||
'/api/update-profile' => 'POST',
|
||||
'/api/profile' => 'GET',
|
||||
'/api/personel/profil' => 'GET',
|
||||
];
|
||||
$publickey = '';
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Models\PersonelModel;
|
||||
use Dhiva\Core\DhivaAES;
|
||||
|
||||
class PersonelController extends BaseController
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user