location controller updated with heading and created new models and controllers for remaining modules
This commit is contained in:
@@ -10,11 +10,16 @@ export const getAssignmentById = async (id) => {
|
||||
return await Model.findById(id);
|
||||
};
|
||||
|
||||
// Read (Get by Query)
|
||||
// Read (Get One by Query)
|
||||
export const getAssignmentByQuery = async (query) => {
|
||||
return await Model.findOne(query);
|
||||
}
|
||||
|
||||
// Read (Get All by Query)
|
||||
export const getAssignmentsByQuery = async (query) => {
|
||||
return await Model.find(query);
|
||||
};
|
||||
|
||||
// Read (Get all)
|
||||
export const getAllAssignments = async () => {
|
||||
return await Model.find();
|
||||
|
||||
Reference in New Issue
Block a user