location controller updated with heading and created new models and controllers for remaining modules
This commit is contained in:
@@ -17,12 +17,13 @@ export const getLocationById = async (id) => {
|
||||
};
|
||||
|
||||
// Read (Get by Query)
|
||||
export const getLocationByQuery = async (query) => {
|
||||
return await Model.findOne(query).sort({ createdOn: -1 });
|
||||
export const getLocationsByQuery = async (query) => {
|
||||
console.log("QUERY", query);
|
||||
return await Model.find(query).sort({ createdOn: -1 });
|
||||
};
|
||||
|
||||
// Read (Get by Radius)
|
||||
export const getLocationByRadius = async (radius) => {
|
||||
export const getLocationsByRadius = async (radius) => {
|
||||
return await Model.find(query);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user