mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-06-17 04:30:31 +00:00
🔄 Update flag asset paths for cities, venues, and countries across API and tools
This commit is contained in:
@@ -52,7 +52,7 @@ class CityController extends Controller
|
||||
->get()
|
||||
->map(function (City $city) use ($withDetails) {
|
||||
if ($withDetails) {
|
||||
$city->flag = asset('vendor/blade-country-flags/4x3-'.$city->country->code.'.svg');
|
||||
$city->flag = asset('vendor/blade-flags/country-'.$city->country->code.'.svg');
|
||||
}
|
||||
|
||||
return $city;
|
||||
|
||||
@@ -41,7 +41,7 @@ class CountryController extends Controller
|
||||
)
|
||||
->get()
|
||||
->map(function (Country $country) {
|
||||
$country->flag = asset('vendor/blade-country-flags/4x3-'.$country->code.'.svg');
|
||||
$country->flag = asset('vendor/blade-flags/country-'.$country->code.'.svg');
|
||||
|
||||
return $country;
|
||||
});
|
||||
|
||||
@@ -51,7 +51,7 @@ class VenueController extends Controller
|
||||
)
|
||||
->get()
|
||||
->map(function (Venue $venue) {
|
||||
$venue->flag = asset('vendor/blade-country-flags/4x3-'.$venue->city->country->code.'.svg');
|
||||
$venue->flag = asset('vendor/blade-flags/country-'.$venue->city->country->code.'.svg');
|
||||
$venue->description = $venue->city->name.', '.$venue->street;
|
||||
|
||||
return $venue;
|
||||
|
||||
@@ -32,7 +32,7 @@ class ListCountriesTool extends Tool
|
||||
->limit(10)
|
||||
->get()
|
||||
->map(function (Country $country) {
|
||||
$country->flag = asset('vendor/blade-country-flags/4x3-'.$country->code.'.svg');
|
||||
$country->flag = asset('vendor/blade-flags/country-'.$country->code.'.svg');
|
||||
|
||||
return $country;
|
||||
});
|
||||
|
||||
@@ -32,7 +32,7 @@ class SearchVenuesTool extends Tool
|
||||
->limit(10)
|
||||
->get()
|
||||
->map(function (Venue $venue) {
|
||||
$venue->flag = asset('vendor/blade-country-flags/4x3-'.$venue->city->country->code.'.svg');
|
||||
$venue->flag = asset('vendor/blade-flags/country-'.$venue->city->country->code.'.svg');
|
||||
$venue->description = $venue->city->name.', '.$venue->street;
|
||||
|
||||
return $venue;
|
||||
|
||||
@@ -24,7 +24,7 @@ it('returns all cities with country code and flag on GET /api/cities?withDetails
|
||||
expect($first)
|
||||
->toHaveKeys(['id', 'name', 'country_id', 'country', 'flag'])
|
||||
->and($first['country'])->toHaveKeys(['id', 'name', 'code'])
|
||||
->and($first['flag'])->toContain('4x3-'.$cities->first()->country->code.'.svg');
|
||||
->and($first['flag'])->toContain('vendor/blade-flags/country-'.$cities->first()->country->code.'.svg');
|
||||
});
|
||||
|
||||
it('limits GET /api/venues to 10 entries without withDetails', function () {
|
||||
|
||||
Reference in New Issue
Block a user