This repository has been archived on 2024-05-20. You can view files and clone it, but cannot push or open issues or pull requests.

32 lines
1.2 KiB
PHP

<?php
use App\Http\Controllers\Api\WebHookController;
use App\Http\Controllers\Api\UserController;
use Illuminate\Support\Facades\Route;
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "api" middleware group. Make something great!
|
*/
Route::middleware(['header.auth', 'throttle:api'])->group(function () {
Route::get('/test', [WebHookController::class, 'test']);
Route::post('/sendQuote', [WebHookController::class, 'sendQuote']);
Route::post('/randomQuote', [WebHookController::class, 'sendRandomQuote']);
Route::prefix('user')->group(function () {
Route::post('register', [UserController::class, 'registerUser']);
Route::get('{user:uuid}', [UserController::class, 'getUser'])
->missing(function () {
return response()->json(['status' => false, 'message' => 'User not found']);
});
});
});