Files
lelong/routes/api.php
T
ismailmasseran e29a5891c8 Bugfix/list clickup issue (#5)
Reviewed-on: #5
Co-authored-by: ISMAIL MASSERAN <ismail@koppkb.com>
Co-committed-by: ISMAIL MASSERAN <ismail@koppkb.com>
2026-10-19 13:30:36 +08:00

159 lines
8.0 KiB
PHP

<?php
use App\Http\Controllers\ApiController;
use App\Http\Controllers\AuthMobile\AuthController;
use App\Http\Controllers\CartController;
use App\Http\Controllers\Mobile\ForgotPasswordController;
use App\Http\Controllers\Mobile\LelongMobileController;
use App\Http\Controllers\Mobile\ResetPasswordController;
use App\Http\Controllers\Mobile\UserController;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
// Public routes
Route::post('/register', [AuthController::class, 'register']);
Route::get('/verifyEmail', [AuthController::class, 'verifyEmail']);
Route::post('/user/login', [AuthController::class, 'loginUser']);
Route::post('/forgotPassword', [AuthController::class, 'forgotPassword']);
Route::get('/resetPassword/{token}', [AuthController::class, 'validateResetToken']);
Route::post('/resetPassword', [AuthController::class, 'updatePassword']);
Route::post('/password/email', [ForgotPasswordController::class, 'sendResetLinkEmail']);
// Route::post('/feepayment', [ApiController::class, 'feepayment']);
// Route::get('/callback', [ApiController::class, 'feepayment']);
Route::post('/feepayment', [ApiController::class, 'feepayment'])->name('feepayment');
Route::post('/bidpayment', [ApiController::class, 'bidpayment'])->name('bidpayment');
Route::get('/portalApi', [LelongMobileController::class, 'portalApi']);
// Protected routes
Route::group(['middleware' => ['auth:sanctum']], function () {
// get user detail by verifying token
Route::get('/getProfile', [AuthController::class, 'getProfile']);
// User
Route::post('/user/logout', [AuthController::class, 'logoutUser']);
Route::post('/password/reset', [ResetPasswordController::class, 'reset']);
// change password user
Route::post('/changePassword', [UserController::class, 'changePassword']);
// User Profile
Route::get('/user/profile', [UserController::class, 'getProfileUser']);
Route::put('/userUpdate/profile', [UserController::class, 'updateProfileUser']);
Route::post('/requestTac', [UserController::class, 'requestTac']);
Route::post('/verifyTac', [UserController::class, 'verifyTac']);
// ============HOME===========================
// today's auction
Route::get('/listcawlelongtoday', [LelongMobileController::class, 'listCawLelongToday']);
// next auction
Route::get('/listcawlelongnext', [LelongMobileController::class, 'listCawLelongNext']);
// ============LIST LELONG===========================
// list cawangan started lelong
Route::get('/listcawlelongtodaystarted', [LelongMobileController::class, 'listCawLelongTodayStarted']);
// list surat exclude in cart and bid-record
Route::get('/lelongDetails/listSuratLelong', [LelongMobileController::class, 'listSuratLelong2']);
// list lelong online
Route::get('/lelongOnline', [LelongMobileController::class, 'lelongOnline']);
// photo marhun
Route::get('/photoMarhun', [LelongMobileController::class, 'photoMarhun']);
// ============CART===========================
// get cart group by cawangan
Route::get('/cartByCawangan/{userId}', [CartController::class, 'getCartByCawangan']);
// add item to cart
Route::post('/addToCart', [CartController::class, 'addToCart']);
// update item in cart
Route::post('/updateItem', [CartController::class, 'updateItem']);
// delete item in cart
Route::post('/deleteItem', [CartController::class, 'deleteItem']);
// number of item in cart
Route::get('/itemInCart', [LelongMobileController::class, 'itemInCart']);
// ===========STALE CART=====================
Route::post('/removeFromCart', [CartController::class, 'removeFromCart']);
Route::get('/cart/{userid}', [CartController::class, 'getCart']);
Route::get('/deleteItem/{id}', [CartController::class, 'deleteCart']);
// ===========BID RECORD======================
// get bid record group by cawangan
Route::get('/bidRecordByCawangan/{userId}', [LelongMobileController::class, 'bidRecordByCawangan']);
// ===========STALE BID RECORD=================
Route::get('/bidder/bidrecord', [LelongMobileController::class, 'bidRecord']);
// ===========RESULT======================
// get all result
Route::get('/resultLelong', [LelongMobileController::class, 'resultLelong']);
// get status result
Route::get('/resultStatus/{userId}/{lelongId}', [LelongMobileController::class, 'resultStatus']);
// get win surat in cawangan (JSON for web dialog)
Route::get('/resultInCawangan', [LelongMobileController::class, 'resultInCawangan']);
// download win surat in cawangan as pdf
Route::get('/resultInCawanganPdf', [LelongMobileController::class, 'resultInCawangan2']);
// get invoice to print pdf
Route::get('/downloadInvoice', [LelongMobileController::class, 'downloadInvoice']);
// ===========PAY======================
// get invoice detail
Route::get('/invoice', [LelongMobileController::class, 'getInvoiceId']);
// get list photo's receipt
Route::get('/listPhotoResit', [LelongMobileController::class, 'listPhotoResit']);
// add photo resit
Route::post('/addPhotoResit', [LelongMobileController::class, 'addPhotoResit']);
// show photo resit
Route::get('/showPhotoResit', [LelongMobileController::class, 'showPhotoResit']);
// delete photo resit
Route::post('/deletePhotoResit', [LelongMobileController::class, 'deletePhotoResit']);
// BY CAWANGAN -> initializie cdm payment
Route::post('/initializeCdmPayment', [LelongMobileController::class, 'initializeCdmPayment']);
// check availabitlity fpx session
Route::get('/checkAvailabilityFpxSession', [LelongMobileController::class, 'checkAvailabilityFpxSession']);
// Lelong
Route::get('/lelongDetails/today', [LelongMobileController::class, 'getlelongdetails']);
Route::get('/lelongDetails/cawangan', [LelongMobileController::class, 'searchLelByCaw']);
Route::get('/lelong/cawangan', [LelongMobileController::class, 'searchLelongByCawangan']);
Route::get('/karat', [LelongMobileController::class, 'getListKarat']);
Route::get('/result/{user_id}', [LelongMobileController::class, 'bidresult']);
Route::get('/bayar/{user_id}/{lelong_id}', [LelongMobileController::class, 'bidresults']);
Route::get('/bayarBaki/{user_id}/{lelong_id}', [LelongMobileController::class, 'bidPayRemaining']);
Route::get('/history/{user_id}', [LelongMobileController::class, 'history']);
Route::post('/bayarcdm', [LelongMobileController::class, 'bayarCdm']);
Route::post('/updateresit', [LelongMobileController::class, 'updateResit']);
// Lelong => Bidder
Route::post('/bidder/biditem', [LelongMobileController::class, 'bidderSelectBidItem']);
Route::get('/bidder/listbiditem', [LelongMobileController::class, 'listBidItem']);
Route::get('/bidder/listBidItemWeb/{user_id}', [LelongMobileController::class, 'listBidItemWeb']);
Route::get('/bidder/historyFeePay', [LelongMobileController::class, 'historyFeePay']);
Route::post('/bidder/updatebiditem', [LelongMobileController::class, 'updatebiditem']);
});
Route::get('/item', 'ApiController@biditem');
Route::get('/jeniskarat', 'ApiController@karat');
Route::get('/listLelong', [LelongMobileController::class, 'listLelong']);
Route::get('/listLelongByCawangan', [LelongMobileController::class, 'listLelongByCawangan']);
Route::get('/listCawangan', [LelongMobileController::class, 'listCawangan']);
Route::get('/listLelongBid', [LelongMobileController::class, 'listLelongBid']);
Route::get('/showPhotoMarhun', [LelongMobileController::class, 'showPhotoMarhun']);
// Route::get('/item',['as'=>'lelong.biditem','uses'=>'LelongController@biditem']);
// Route::get('/lelongstop/{id}',['as'=>'lelong.stop','uses'=>'LelongController@stop']);