mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-06-21 18:00: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()
|
->get()
|
||||||
->map(function (City $city) use ($withDetails) {
|
->map(function (City $city) use ($withDetails) {
|
||||||
if ($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;
|
return $city;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class CountryController extends Controller
|
|||||||
)
|
)
|
||||||
->get()
|
->get()
|
||||||
->map(function (Country $country) {
|
->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;
|
return $country;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class VenueController extends Controller
|
|||||||
)
|
)
|
||||||
->get()
|
->get()
|
||||||
->map(function (Venue $venue) {
|
->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;
|
$venue->description = $venue->city->name.', '.$venue->street;
|
||||||
|
|
||||||
return $venue;
|
return $venue;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class ListCountriesTool extends Tool
|
|||||||
->limit(10)
|
->limit(10)
|
||||||
->get()
|
->get()
|
||||||
->map(function (Country $country) {
|
->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;
|
return $country;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class SearchVenuesTool extends Tool
|
|||||||
->limit(10)
|
->limit(10)
|
||||||
->get()
|
->get()
|
||||||
->map(function (Venue $venue) {
|
->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;
|
$venue->description = $venue->city->name.', '.$venue->street;
|
||||||
|
|
||||||
return $venue;
|
return $venue;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ it('returns all cities with country code and flag on GET /api/cities?withDetails
|
|||||||
expect($first)
|
expect($first)
|
||||||
->toHaveKeys(['id', 'name', 'country_id', 'country', 'flag'])
|
->toHaveKeys(['id', 'name', 'country_id', 'country', 'flag'])
|
||||||
->and($first['country'])->toHaveKeys(['id', 'name', 'code'])
|
->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 () {
|
it('limits GET /api/venues to 10 entries without withDetails', function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user