This commit is contained in:
Naden
2026-04-25 04:51:56 +07:00
parent ee40989c37
commit 8beaae7547
4 changed files with 46 additions and 51 deletions

14
.env
View File

@@ -33,13 +33,13 @@ app.assetBaseURL = 'https://project.adhivasindo.co.id/api_tambang_ntb/'
# DATABASE
#--------------------------------------------------------------------
database.default.hostname = localhost
database.default.database = stock_map
database.default.username = postgres
database.default.password = yoga21
database.default.DBDriver = Postgre
database.default.DBPrefix =
database.default.port = 5432
database.postgre.hostname = localhost
database.postgre.database = stock_map
database.postgre.username = postgres
database.postgre.password = yoga21
database.postgre.DBDriver = Postgre
database.postgre.DBPrefix =
database.postgre.port = 5432
# database.tests.hostname = localhost
# database.tests.database = ci4_test

View File

@@ -2,13 +2,12 @@
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');
// API Routes Group
$routes->group('api', function($routes) {
// Authentication & Profile
$routes->post('auth', 'SuperUserController::auth');
$routes->get('logout', 'SuperUserController::logout');
@@ -21,12 +20,6 @@ $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');
});

View File

@@ -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 = '';

View File

@@ -3,6 +3,7 @@
namespace App\Controllers;
use App\Models\PersonelModel;
use Dhiva\Core\DhivaAES;
class PersonelController extends BaseController
{