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
#-------------------------------------------------------------------- #--------------------------------------------------------------------
database.default.hostname = localhost database.postgre.hostname = localhost
database.default.database = stock_map database.postgre.database = stock_map
database.default.username = postgres database.postgre.username = postgres
database.default.password = yoga21 database.postgre.password = yoga21
database.default.DBDriver = Postgre database.postgre.DBDriver = Postgre
database.default.DBPrefix = database.postgre.DBPrefix =
database.default.port = 5432 database.postgre.port = 5432
# database.tests.hostname = localhost # database.tests.hostname = localhost
# database.tests.database = ci4_test # database.tests.database = ci4_test

View File

@@ -2,31 +2,24 @@
use Dhiva\Core\DhivaRoutes; use Dhiva\Core\DhivaRoutes;
$routes->set404Override('App\Controllers\RoutesController::notfound');
// Dev/Health Check // Dev/Health Check
$routes->get('/', 'DevController::sukses'); $routes->get('/', 'DevController::sukses');
$routes->get('/sukses', 'DevController::sukses'); $routes->get('/sukses', 'DevController::sukses');
$routes->get('testdb', 'TestDb::test');
// Authentication & Profile // API Routes Group
$routes->post('auth', 'SuperUserController::auth'); $routes->group('api', function($routes) {
$routes->get('logout', 'SuperUserController::logout'); // Authentication & Profile
$routes->get('profile', 'SuperUserController::getProfile'); $routes->post('auth', 'SuperUserController::auth');
$routes->post('update-profile', 'SuperUserController::updateProfile'); $routes->get('logout', 'SuperUserController::logout');
$routes->post('update-password', 'SuperUserController::updatePassword'); $routes->get('profile', 'SuperUserController::getProfile');
$routes->post('update-profile', 'SuperUserController::updateProfile');
$routes->post('update-password', 'SuperUserController::updatePassword');
// Personel & DRH (New Features) // Personel & DRH (New Features)
$routes->get('personel/profil', 'PersonelController::getProfil'); $routes->get('personel/profil', 'PersonelController::getProfil');
$routes->get('personel/drh', 'PersonelController::getDaftarRiwayatHidup'); $routes->get('personel/drh', 'PersonelController::getDaftarRiwayatHidup');
$routes->post('personel/generate-link', 'PersonelController::generateEncryptedLink'); $routes->post('personel/generate-link', 'PersonelController::generateEncryptedLink');
// Legacy / Other (Keep if needed by other components, otherwise clean up) // Standard CRUD via DhivaRoutes (Keep for compatibility)
// For now, I'll keep the ones the user didn't explicitly ask to remove, DhivaRoutes::Route($routes, 'user', 'SuperUserController');
// 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() public function initControllers()
{ {
$bypassed = [ $bypassed = [
'/auth' => 'POST', '/api/auth' => 'POST',
'/auth/v2' => 'POST', '/api/auth/v2' => 'POST',
'/user' => 'POST', '/api/user' => 'POST',
'/user-verifications/request-otp' => 'POST', '/api/user-verifications/request-otp' => 'POST',
'/user-verifications/verification-otp-code' => 'POST', '/api/user-verifications/verification-otp-code' => 'POST',
'/user-verifications/resend-otp-code' => 'POST', '/api/user-verifications/resend-otp-code' => 'POST',
'/user-verifications/upload-face-photos' => 'POST', '/api/user-verifications/upload-face-photos' => 'POST',
'/forgot-password' => 'POST', '/api/forgot-password' => 'POST',
'/reset-password' => 'POST', '/api/reset-password' => 'POST',
'/pelanggaran/feedback' => 'POST', '/api/pelanggaran/feedback' => 'POST',
'/list-pelanggaran' => 'GET', '/api/list-pelanggaran' => 'GET',
'/pelanggaran/get-feedback-by-id' => 'POST', '/api/pelanggaran/get-feedback-by-id' => 'POST',
'/pencarian-pelanggaran-2' => 'POST', '/api/pencarian-pelanggaran-2' => 'POST',
'/check-bypass-liveness' => 'GET', '/api/check-bypass-liveness' => 'GET',
'/koperasi' => 'GET', '/api/koperasi' => 'GET',
'/koperasi/' => 'GET', '/api/koperasi/' => 'GET',
'/get-distribusi-shu-mingguan/' => 'GET', '/api/get-distribusi-shu-mingguan/' => 'GET',
'/get-distribusi-shu-mingguan' => 'GET', '/api/get-distribusi-shu-mingguan' => 'GET',
'/live-gold-price' => 'GET', '/api/live-gold-price' => 'GET',
'/update-profile' => 'POST', '/api/update-profile' => 'POST',
'/profile' => 'GET', '/api/profile' => 'GET',
'/api/personel/profil' => 'GET',
]; ];
$publickey = ''; $publickey = '';

View File

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