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
+31
View File
@@ -0,0 +1,31 @@
import Model from "./model.js";
// Create
export const createVenue = async (data) => {
return await Model.create(data);
};
// Read (Get by ID)
export const getVenueById = async (id) => {
return await Model.findById(id);
};
// Read (Get by Query)
export const getVenueByQuery = async (query) => {
return await Model.findOne(query);
}
// Read (Get all)
export const getAllVenues = async () => {
return await Model.find();
};
// Update
export const updateVenue = async (id, data) => {
return await Model.findByIdAndUpdate(id, data, { new: true });
};
// Aggregate
export const aggregateVenue = async (pipeline) => {
return await Model.aggregate(pipeline);
};