location update optimized with schema changes and geoJson Compatability testing endpoint with encrypted key authorization

This commit is contained in:
Shibi Chakkaravarthy
2026-04-17 14:15:11 +05:30
parent b44abf9c88
commit 92769cfd38
19 changed files with 459 additions and 27 deletions
+13
View File
@@ -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],
};
};
+2
View File
@@ -0,0 +1,2 @@
export { default as locationSchema } from "./geoJson.helper";
export * from "./geoJson.helper";