You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/api/student/availability To update the student availability
Request Type: PUT
Request Body: {id: 'Type String', isAvailable: 'true or false'}
Response: { message: 'Student availability has been updated.', success: true }
/api/student/ - To delete the a student details
Request Type: DELETE
Request Body: {id: 'Type String'}
Response: { message: `Student with ID ${id} has been deleted`, success: true }
Endpoints for /api/room:
/api/room/block/:block - To get the room of a given :block
Request Type: GET
Response: [{id:'Type String', type:'CLEANING or REPAIR', block:'A or B or C or D', incharge:, time:'Type String', gender:'BOY or GIRL'}, ...]
/api/room/all - To Get all the rooms
Request Type: GET
Response: [{id:'Type String', type:'CLEANING or REPAIR', block:'A or B or C or D', incharge:, time:'Type String', gender:'BOY or GIRL'}, ...]
/api/room/ - To add new room
Request Type: POST
Request Body: {id:'Type String', type:'CLEANING or REPAIR', block:'A or B or C or D', incharge:, time:'Type String', gender:'BOY or GIRL'}
Response: { success: true, message: 'Room has been created.' }
/api/room/:_id - To delete a room with ID :_id
Request Type: DELETE
Response: { succes: true, message: 'Room has been deleted.' }
Endpoints for /api/staff:
/api/staff/ - To get all the staff details
Request Type: GET
Response: [{name: 'Type String', occupation: 'Type String', mobile: 'type String', isAvailable: 'true or false'}]
/api/staff/ - To add the staff details
Request Type: POST
Request Body: {name: 'Type String', occupation: 'Type String', mobile: 'type String', isAvailable: 'true or false'}
Response: { success: true, message: 'Staff has been saved.' }
/api/staff/:_id - To delete a staff with ID :_id
Request Type: DELETE
Response: { success: true, message: 'Staff has been deleted.' }
/api/staff/availability/:id - To Change Staff's availability with ID :id
Request Type: PUT
Request Body: { isAvailable: 'true or false'}
Response: { message: 'Staff availability has been updated.', success: true }
Note: By default the mongo id for records is also being sent in GET requests.