Commit 37b9037c authored by Frederick Zhang's avatar Frederick Zhang

fix building api

parent 90886be1
......@@ -22,7 +22,7 @@ Route::get('/map/download', function (Request $request) {
], 400);
}
$building = \App\Building::find($buildingId);
if ($building->count()) {
if ($building) {
return response()->json($building->toJson(), 200);
} else {
return response()->json([
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment