location controller updated with heading and created new models and controllers for remaining modules

This commit is contained in:
Shibi Chakkaravarthy
2026-05-04 20:57:03 +05:30
parent 1245e09111
commit 54d9508dc8
31 changed files with 2140 additions and 96 deletions
+6 -1
View File
@@ -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();