|
665 | 665 | * @apiSuccess {String[]} module.cognitiveLevels Array of cognitive levels of |
666 | 666 | * attainment as per Bloom's Taxanomy (L1-L6). |
667 | 667 | */ |
| 668 | + |
| 669 | +// ------------------------------------------------------------------------------------------ |
| 670 | +// Group. |
| 671 | +// ------------------------------------------------------------------------------------------ |
| 672 | + |
| 673 | +/** |
| 674 | + * @api {post} /group/add Add Group |
| 675 | + * @apiName AddGroup |
| 676 | + * @apiGroup Group |
| 677 | + * @apiDescription Add a new group. |
| 678 | + * |
| 679 | + * @apiBody {String} title Group title. |
| 680 | + * @apiBody {ObjectId[]} students Array of student ObjectIDs. |
| 681 | + * |
| 682 | + * @apiSuccess {String} res Response message. |
| 683 | + * @apiError (Error 500) GroupAddError Error while adding the group |
| 684 | + * |
| 685 | + * @apiSuccessExample Success-Response: |
| 686 | + * HTTP/1.1 200 OK |
| 687 | + * { |
| 688 | + * "res": "added group Example Group" |
| 689 | + * } |
| 690 | + * |
| 691 | + * @apiErrorExample Error-Response: |
| 692 | + * HTTP/1.1 500 Internal Server Error |
| 693 | + * { |
| 694 | + * "err": "Error while inserting in DB" |
| 695 | + * } |
| 696 | + */ |
| 697 | + |
| 698 | +/** |
| 699 | + * @api {delete} /group/delete/:id Delete Group |
| 700 | + * @apiName DeleteGroup |
| 701 | + * @apiGroup Group |
| 702 | + * |
| 703 | + * @apiParam {ObjectId} id The ObjectID of the group to delete. |
| 704 | + * |
| 705 | + * @apiSuccess {String} res Success message indicating the deletion. |
| 706 | + * @apiError (Error 500) GroupDeleteError Error while deleting the group |
| 707 | + * |
| 708 | + */ |
| 709 | + |
| 710 | +/** |
| 711 | + * @api {post} /group/update/:id Update Group Details |
| 712 | + * @apiName UpdateGroup |
| 713 | + * @apiGroup Group |
| 714 | + * @apiDescription Update existing group details. |
| 715 | + * |
| 716 | + * @apiParam {ObjectId} id The ObjectID of the group to update. |
| 717 | + * @apiBody {String} [title] Group title. |
| 718 | + * @apiBody {ObjectId[]} [students] Array of student ObjectIDs. |
| 719 | + * |
| 720 | + * @apiSuccess {String} res Group updated. |
| 721 | + * @apiError (Error 500) GroupUpdateError Error in updating database |
| 722 | + * |
| 723 | + */ |
| 724 | + |
| 725 | +/** |
| 726 | + * @api {get} /group/list Get Group List |
| 727 | + * @apiName GetGroupList |
| 728 | + * @apiGroup Group |
| 729 | + * |
| 730 | + * @apiQuery {String} [title] Title of the group. |
| 731 | + * |
| 732 | + * @apiSuccess {Group[]} res Array of filtered group documents. |
| 733 | + * @apiSuccess {ObjectId} group._id ObjectID of the group document in the database. |
| 734 | + * @apiSuccess {String} group.title Title of the group. |
| 735 | + * @apiSuccess {ObjectId[]} group.students Array of student ObjectIDs in the group. |
| 736 | + */ |
0 commit comments