API fix - really retrieve gpx file

In the db the data should be something like "api-routes/route_1_1.gpx"
This commit is contained in:
Ale Gallo 2024-02-09 16:40:01 +01:00
parent 6d82ab8901
commit 7428339d64

View file

@ -118,7 +118,7 @@ class RouteController extends Controller
public function downloadGpx($id, $sportId)
{
$routeDetail = RouteSportDetails::where(['route_id' => $id, 'sport_id' => $sportId])->first();
$file = storage_path("{$routeDetail->gpx_path}");
$file = storage_path("app/public/{$routeDetail->gpx_path}");
return response()->download($file);
}