coolify/routes/api.php
2023-05-09 11:33:50 +02:00

31 lines
886 B
PHP

<?php
use App\Models\GithubApp;
use Illuminate\Http\Request;
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 and all of them will
| be assigned to the "api" middleware group. Make something great!
|
*/
Route::get('/health', function () {
return 'OK';
});
Route::get('/webhooks/source/github/redirect', function () {
$code = request()->get('code');
$state = request()->get('state');
$github_app = GithubApp::where('uuid', $state)->firstOrFail();
return 'OK';
});
// Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
// return $request->user();
// });