Updated logo API

This commit is contained in:
2026-04-23 21:32:25 +10:00
parent 110ed5b984
commit 678096b463
22 changed files with 638 additions and 146 deletions
+20 -6
View File
@@ -1,11 +1,14 @@
<?php
use App\Http\Controllers\Api\AirlineApiController;
use App\Http\Controllers\Api\UserApiController;
use App\Http\Controllers\FlightController;
use App\Http\Controllers\FlightImportController;
use App\Http\Controllers\FlightProfileController;
use App\Http\Controllers\LogoController;
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\SearchController;
use App\Http\Controllers\UserController;
use App\Models\Airline;
use App\Models\FlightClass;
use App\Models\FlightReason;
@@ -58,6 +61,8 @@ Route::domain(config('app.domain'))->group(
Route::get('/flights/lookup', [FlightController::class, 'lookup'])->name('flights.lookup');
Route::post('/flights/import', [FlightImportController::class, 'store'])->name('flights.import.store');
Route::post('/u/{user}/follow', [UserController::class, 'follow'])->name('profile.follow');
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
@@ -71,11 +76,11 @@ Route::domain(config('app.domain'))->group(
Route::get('/search/airports', [SearchController::class, 'airports'])->name('search.airports');
Route::get('/u/{username}', [FlightProfileController::class, 'view'])->name('profile.view');
Route::get('/u/{username}/map', [FlightProfileController::class, 'map'])->name('profile.map');
Route::get('/u/{username}/departure-board/{flight?}', [FlightProfileController::class, 'departureBoard'])
Route::get('/u/{user}', [FlightProfileController::class, 'view'])->name('profile.view');
Route::get('/u/{user}/map', [FlightProfileController::class, 'map'])->name('profile.map');
Route::get('/u/{user}/departure-board/{flight?}', [FlightProfileController::class, 'departureBoard'])
->name('profile.departure-board');
Route::get('/u/{username}/boarding-passes', [FlightProfileController::class, 'boardingPasses'])->name('profile.boarding-passes');
Route::get('/u/{user}/boarding-passes', [FlightProfileController::class, 'boardingPasses'])->name('profile.boarding-passes');
require __DIR__.'/auth.php';
@@ -91,7 +96,16 @@ Route::domain(config('app.api_domain'))->group(function () {
return response()->json(['message' => 'Welcome to the FlightsGoneBy API']);
});
Route::get('airline/{internalName}/logo/tail', [App\Http\Controllers\Api\LogoController::class, 'getLogoByInternalName']);
Route::get('user/{username}/next-flight', [App\Http\Controllers\Api\UserController::class, 'nextFlight']);
Route::prefix('airline')->controller(AirlineApiController::class)->group(function () {
Route::get('{internalName}', 'get')->name('airline.show');
Route::get('code/{code}', 'getByCode')->name('airline.code.index');
Route::get('{internalName}/logo/tail', 'getLogoByInternalName')->name('airline.logo.tail');
});
Route::prefix('user')->controller(UserApiController::class)->group(function () {
Route::get('{username}/next-flight', 'nextFlight');
Route::get('{username}/flights', 'flights');
});
});