- Add StatusResource for responses - Add OK & KO responses - Update composer.json for dependencies - Rename deleteUser to delete
29 lines
1.3 KiB
PHP
29 lines
1.3 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use App\Http\Controllers\Api\v1\CustomerController;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 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::prefix('v1')->middleware(['auth:api', 'check-brand'])->group(function() {
|
|
// Clients
|
|
Route::get('/customer/{id}', [CustomerController::class, 'show']);
|
|
Route::post('/customer/create', [CustomerController::class, 'store']);
|
|
Route::put('/customer/{id}', [CustomerController::class, 'update']);
|
|
Route::delete('/customer/{id}', [CustomerController::class, 'delete']);
|
|
Route::post('/customer/{id}/change-password', [CustomerController::class, 'changePassword']);
|
|
Route::post('/customer/{id}/activate', [CustomerController::class, 'activateAccount']);
|
|
Route::post('/customer/{id}/toggle-optin', [CustomerController::class, 'toggleOptin']);
|
|
Route::post('/customer/login', [CustomerController::class, 'authenticate']);
|
|
// Optin simple
|
|
Route::post('/single-optin', [CustomerController::class, 'addSingleOptin']);
|
|
});
|