feat: add geo points endpoint
This commit is contained in:
19
apps/web/app/api/geo/shape.ts
Normal file
19
apps/web/app/api/geo/shape.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
type GeoRow = {
|
||||
id: string;
|
||||
gps_lat: number | null;
|
||||
gps_lon: number | null;
|
||||
};
|
||||
|
||||
type GeoPoint = {
|
||||
id: string;
|
||||
gps_lat: number | null;
|
||||
gps_lon: number | null;
|
||||
};
|
||||
|
||||
export function shapeGeoRows(rows: GeoRow[]): GeoPoint[] {
|
||||
return rows.map((row) => ({
|
||||
id: row.id,
|
||||
gps_lat: row.gps_lat,
|
||||
gps_lon: row.gps_lon,
|
||||
}));
|
||||
}
|
||||
Reference in New Issue
Block a user