|
667 | 667 | */ |
668 | 668 |
|
669 | 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 | +// ------------------------------------------------------------------------------------------ |
670 | 699 | // Practical. |
671 | 700 | // ------------------------------------------------------------------------------------------ |
672 | 701 |
|
|
794 | 823 | * } |
795 | 824 | */ |
796 | 825 |
|
| 826 | +/** |
| 827 | + * @api {delete} /assignment/delete/:assignmentId To delete Assignment |
| 828 | + * @apiName DeleteAssignment |
| 829 | + * @apiGroup Assignment |
| 830 | + * |
| 831 | + * @apiParam {String} assignmentId The ID of the assignment document to delete. |
| 832 | + * |
| 833 | + * @apiSuccess {String} res Success message indicating the deletion. |
| 834 | + * |
| 835 | + * @apiError (Error 500) err Error message if there was an error during the deletion. |
| 836 | + * |
| 837 | +* */ |
| 838 | + |
| 839 | +/** |
| 840 | + * @api {post} /assignment/update update assignment details |
| 841 | + * @apiName UpdateAssignment |
| 842 | + * @apiGroup Assignment |
| 843 | + * @apiDescription update Existing assignment |
| 844 | + * |
| 845 | + * @apiBody {String} id Id of the assignment to be updated |
| 846 | + * @apiBody {String} [no] Assignment number. |
| 847 | + * @apiBody {String} [title] assignment title. |
| 848 | + * @apiBody {String} [type] type of assignment. |
| 849 | + * @apiBody {Number} [marks] marks in assignment. |
| 850 | + * |
| 851 | + * @apiSuccess {String} res Assignment updated. |
| 852 | + * @apiError (Error 500) err Error in updating database |
| 853 | + * |
| 854 | + */ |
| 855 | + |
| 856 | +/** |
| 857 | + * @api {get} assignment/list Get Assignment List |
| 858 | + * @apiName GetAssignment |
| 859 | + * @apiGroup Assignment |
| 860 | + * |
| 861 | + * @apiBody {String} [no] Number of assignment. |
| 862 | + * @apiBody {String} [title] Title of assignment. |
| 863 | + * @apiBody {String} [type] type of assignment. |
| 864 | + * @apiBody {Number} [marks] marks in assignment. |
| 865 | + * |
| 866 | + * @apiSuccess {assignment[]} res Array of Filtered assignment Doc. |
| 867 | + * @apiSuccess {String} assignment._id ID of document given by database. |
| 868 | + * @apiBody {String} [no] Number of assignment. |
| 869 | + * @apiBody {String} [title] Title of assignment. |
| 870 | + * @apiBody {String} [type] type of assignment. |
| 871 | + * @apiBody {Number} [marks] marks in assignment. |
| 872 | + */ |
| 873 | + |
797 | 874 | // ------------------------------------------------------------------------------------------ |
798 | 875 | // Semester |
799 | 876 | // ------------------------------------------------------------------------------------------ |
|
0 commit comments