refactor wifi location parsing
This commit is contained in:
@ -54,9 +54,14 @@ export const getLocationForWifi = async (
|
||||
Authorization: `Basic ${process.env.WIGLE_TOKEN}`,
|
||||
},
|
||||
});
|
||||
return await response.json();
|
||||
if (response.ok) {
|
||||
return await response.json();
|
||||
}
|
||||
console.log(response.status);
|
||||
return undefined;
|
||||
|
||||
} catch (error) {
|
||||
console.error("Fehler beim Aufruf des Services:", error);
|
||||
console.error("Error during call of API wigle.net:", error);
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user