665665 * @apiSuccess {String[]} module.cognitiveLevels Array of cognitive levels of
666666 * attainment as per Bloom's Taxanomy (L1-L6).
667667 */
668+
669+ // ------------------------------------------------------------------------------------------
670+ // Assignment.
671+ // ------------------------------------------------------------------------------------------
672+ /**
673+ * @api {post } /assignment/add Add assignment
674+ * @apiName Addassignment
675+ * @apiGroup assignment
676+ * @apiDescription Add a new assignment.
677+ *
678+ * @apiBody {String} no Assignment number.
679+ * @apiBody {String} title assignment title.
680+ * @apiBody {String} type type of assignment.
681+ * @apiBody {Number} marks marks in assignment.
682+ *
683+ * @apiSuccess {String} res Response message.
684+ * @apiError (Error 500) UserNotFound The of the User was not found
685+ *
686+ * @apiSuccessExample Success-Response:
687+ * HTTP/1.1 200 OK
688+ * {
689+ * "res": "added assignment Example Assignment"
690+ * }
691+ *
692+ * @apiErrorExample Error-Response:
693+ * HTTP/1.1 500 Internal Server Error
694+ * {
695+ * "err": "Error while inserting in DB"
696+ * }
697+ */
698+
699+ /**
700+ * @api {delete } /assignment/delete/:assignmentId To delete Assignment
701+ * @apiName DeleteAssignment
702+ * @apiGroup Assignment
703+ *
704+ * @apiParam {String} assignmentId The ID of the assignment document to delete.
705+ *
706+ * @apiSuccess {String} res Success message indicating the deletion.
707+ *
708+ * @apiError (Error 500) err Error message if there was an error during the deletion.
709+ *
710+ * */
711+
712+ /**
713+ * @api {post } /assignment/update update assignment details
714+ * @apiName UpdateAssignment
715+ * @apiGroup Assignment
716+ * @apiDescription update Existing assignment
717+ *
718+ * @apiBody {String} id Id of the assignment to be updated
719+ * @apiBody {String} [no] Assignment number.
720+ * @apiBody {String} [title] assignment title.
721+ * @apiBody {String} [type] type of assignment.
722+ * @apiBody {Number} [marks] marks in assignment.
723+ *
724+ * @apiSuccess {String} res Assignment updated.
725+ * @apiError (Error 500) err Error in updating database
726+ *
727+ */
728+
729+ /**
730+ * @api {get } assignment/list Get Assignment List
731+ * @apiName GetAssignment
732+ * @apiGroup Assignment
733+ *
734+ * @apiBody {String} [no] Number of assignment.
735+ * @apiBody {String} [title] Title of assignment.
736+ * @apiBody {String} [type] type of assignment.
737+ * @apiBody {Number} [marks] marks in assignment.
738+ *
739+ * @apiSuccess {assignment[]} res Array of Filtered assignment Doc.
740+ * @apiSuccess {String} assignment._id ID of document given by database.
741+ * @apiBody {String} [no] Number of assignment.
742+ * @apiBody {String} [title] Title of assignment.
743+ * @apiBody {String} [type] type of assignment.
744+ * @apiBody {Number} [marks] marks in assignment.
745+ */
0 commit comments