curl --request PUT \
--url http://localhost:5000/api/application/approve/64b3e7a2f1c0d2e3a4b5c6d7
{
"_id": "64b3e7a2f1c0d2e3a4b5c6d7",
"studentId": "64a1f2c3e4b0d5f6a7b8c9d0",
"teacherId": "64a1f2c3e4b0d5f6a7b8c9d1",
"type": "LEAVE",
"message": "I need to take a leave of absence from January 20 to January 25.",
"status": "APPROVED",
"__v": 0
}
Approve a pending application by its ID.
curl --request PUT \
--url http://localhost:5000/api/application/approve/64b3e7a2f1c0d2e3a4b5c6d7
{
"_id": "64b3e7a2f1c0d2e3a4b5c6d7",
"studentId": "64a1f2c3e4b0d5f6a7b8c9d0",
"teacherId": "64a1f2c3e4b0d5f6a7b8c9d1",
"type": "LEAVE",
"message": "I need to take a leave of absence from January 20 to January 25.",
"status": "APPROVED",
"__v": 0
}
Updates an existing application’s status toDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/praveenarya123/sps-backend/llms.txt
Use this file to discover all available pages before exploring further.
APPROVED. The application is located by its MongoDB ObjectId supplied as a path parameter.
status set to APPROVED.
LEAVE, COMPLAINT, REQUEST).APPROVED after a successful call.id does not match any application, the server will return null. Ensure the ObjectId is valid and exists before calling this endpoint.curl --request PUT \
--url http://localhost:5000/api/application/approve/64b3e7a2f1c0d2e3a4b5c6d7
{
"_id": "64b3e7a2f1c0d2e3a4b5c6d7",
"studentId": "64a1f2c3e4b0d5f6a7b8c9d0",
"teacherId": "64a1f2c3e4b0d5f6a7b8c9d1",
"type": "LEAVE",
"message": "I need to take a leave of absence from January 20 to January 25.",
"status": "APPROVED",
"__v": 0
}