47 lines
1.6 KiB
PHP
47 lines
1.6 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\API\AccountController;
|
|
use App\Http\Controllers\API\AuthController;
|
|
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!
|
|
|
|
|
*/
|
|
|
|
// Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
|
|
|
|
// });
|
|
|
|
|
|
Route::post('/register', [AuthController::class, 'register']);
|
|
Route::post('/login', [AuthController::class, 'login']);
|
|
Route::post('/reset-password', [AuthController::class, 'updatePassword']);
|
|
Route::post('/forgot-password', [AuthController::class, 'sendPasswordResetLinkEmail']);
|
|
Route::post('/verify-email', [AuthController::class, 'verifyEmail']);
|
|
|
|
|
|
Route::middleware(['auth.client','auth:api'])->group(function () {
|
|
/**
|
|
* Client endpoints
|
|
*/
|
|
Route::get('/client', [AuthController::class, 'client']);
|
|
Route::post('/logout', [AuthController::class, 'logout']);
|
|
Route::post('/update-client', [AuthController::class, 'updateClient']);
|
|
/**
|
|
* Account endpoints
|
|
*/
|
|
Route::group(['prefix' => 'account'],function () {
|
|
Route::get('/',[AccountController::class, 'account']);
|
|
Route::put('contacts',[AccountController::class,'storeContacts']);
|
|
Route::put('bank',[AccountController::class,'storeBankAccount']);
|
|
});
|
|
|
|
});
|