- API routes refactoring part 3

This commit is contained in:
Peter Papp
2021-02-26 17:10:21 +01:00
parent 00e515e995
commit fd02fbfe08
4 changed files with 17 additions and 25 deletions

View File

@@ -1,24 +1,7 @@
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
// Stripe WebHook
use App\Http\Controllers\General\UpgradeAppController;
Route::post('/stripe/webhook', 'WebhookController@handleWebhook');
// Deployment WebHook URL
Route::post('/deploy/github', 'DeployController@github');
// App public files
Route::get('/avatars/{avatar}', 'FileAccessController@get_avatar')->name('avatar');
Route::get('/system/{image}', 'FileAccessController@get_system_image');
@@ -40,13 +23,6 @@ Route::group(['middleware' => ['auth:api', 'auth.master', 'scope:master']], func
Route::get('/invoice/{customer}/{token}', 'Admin\InvoiceController@show');
});
// Admin system tools
Route::group(['middleware' => ['auth:api', 'auth.master', 'auth.admin', 'scope:master'], 'prefix' => 'service'], function () {
Route::post('/upgrade', [UpgradeAppController::class, 'upgrade']);
Route::get('/down', [UpgradeAppController::class, 'down']);
Route::get('/up', [UpgradeAppController::class, 'up']);
});
// Get og site for web crawlers
if( Crawler::isCrawler()) {
Route::get('/shared/{token}', 'AppFunctionsController@og_site');