Skip to content

Commit 57174a6

Browse files
committed
chore: php linting
1 parent ec72281 commit 57174a6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/Http/Controllers/MarkerController.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ public function storeInBulk(Request $request, Map $map)
257257
$currentIteration = 0;
258258

259259
foreach ($markerIds as $marker) {
260-
261260
$locations = $validated_data['markers'][$currentIteration]['locations'] ?? [
262261
[
263262
'lat' => $validated_data['markers'][$currentIteration]['lat'],
@@ -331,7 +330,9 @@ public function storeInBulkFromFile(Request $request, Map $map)
331330
]);
332331

333332
// If the file is a GPX file, parse it and return the markers
334-
if ($request->file('file')->getClientOriginalExtension() === 'gpx') {
333+
$fileMimeType = $request->file('file')->getMimeType();
334+
335+
if (Str::contains($fileMimeType, 'gpx')) {
335336
$parser = new GPXParser();
336337
} else {
337338
return response()->json(['error' => 'File type not supported'], 422);

0 commit comments

Comments
 (0)