mirror of
https://github.com/FoggedLens/deflock.git
synced 2026-10-05 06:56:55 +02:00
a little hacky but it works
This commit is contained in:
1 parent
acfff6bb40
commit
6d8b3ba42f
7 files changed
+372
-11
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import axios from "axios";
|
||||
|
||||
export interface BoundingBox {
|
||||
minLat: number;
|
||||
maxLat: number;
|
||||
minLng: number;
|
||||
maxLng: number;
|
||||
}
|
||||
|
||||
const apiService = axios.create({
|
||||
baseURL: "http://localhost:8080",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
|
||||
export const getALPRs = async (boundingBox: BoundingBox) => {
|
||||
const queryParams = new URLSearchParams({
|
||||
minLat: boundingBox.minLat.toString(),
|
||||
maxLat: boundingBox.maxLat.toString(),
|
||||
minLng: boundingBox.minLng.toString(),
|
||||
maxLng: boundingBox.maxLng.toString(),
|
||||
});
|
||||
const response = await apiService.get(`/alpr?${queryParams.toString()}`);
|
||||
return response.data;
|
||||
}
|
||||
Reference in new issue
Block a user