location update optimized with schema changes and geoJson Compatability testing endpoint with encrypted key authorization
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { Schema } from "mongoose";
|
||||
|
||||
export default new Schema({
|
||||
type: { type: String, default: "Point", enum: ["Point"] },
|
||||
coordinates: [Number],
|
||||
});
|
||||
|
||||
export const coordinatesToGeoJson = (coords) => {
|
||||
return {
|
||||
type: "Point",
|
||||
coordinates: [coords.latitude, coords.longitude],
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
export { default as locationSchema } from "./geoJson.helper";
|
||||
export * from "./geoJson.helper";
|
||||
|
||||
Reference in New Issue
Block a user