API fix - retrieve gpx file
This commit is contained in:
parent
09143cdeca
commit
6d82ab8901
1 changed files with 2 additions and 3 deletions
|
@ -117,9 +117,8 @@ class RouteController extends Controller
|
||||||
// Download the GPX file for a specific route and sport
|
// Download the GPX file for a specific route and sport
|
||||||
public function downloadGpx($id, $sportId)
|
public function downloadGpx($id, $sportId)
|
||||||
{
|
{
|
||||||
$routeDetail = RouteSportDetails::where(['route_id' => $id, 'sport_id' => $sportId])
|
$routeDetail = RouteSportDetails::where(['route_id' => $id, 'sport_id' => $sportId])->first();
|
||||||
->first();
|
$file = storage_path("{$routeDetail->gpx_path}");
|
||||||
$file = storage_path("app/{$routeDetail->gpx_path}");
|
|
||||||
|
|
||||||
return response()->download($file);
|
return response()->download($file);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue