14111411 * @apiSuccess {Number} student.roll no of the student.
14121412 * @apiSuccess {ObjectId} student.coursesOpted by the student(ObjectId).
14131413 */
1414+
1415+ // ------------------------------------------------------------------------------------------
1416+ // Topic.
1417+ // ------------------------------------------------------------------------------------------
1418+
1419+ /**
1420+ * @api {post } /topic/add Add topic
1421+ * @apiName AddTopic
1422+ * @apiGroup Topic
1423+ * @apiDescription Add a new Topic.
1424+ *
1425+ * @apiBody {String} Title of the content(topic).
1426+ *
1427+ * @apiSuccess {String} res Response message.
1428+ * @apiError (Error 500) DatabaseError Err message if there is an error inserting into the database.
1429+ *
1430+ * @apiSuccessExample Success-Response:
1431+ * HTTP/1.1 200 OK
1432+ * {
1433+ * "res": "Added topic"
1434+ * }
1435+ *
1436+ * @apiErrorExample Error-Response:
1437+ * HTTP/1.1 500 Internal Server Error
1438+ * {
1439+ * "err": "Error while inserting in DB"
1440+ * }
1441+ */
1442+
14141443// ------------------------------------------------------------------------------------------
14151444// Faculty
14161445// ------------------------------------------------------------------------------------------
14521481 * }
14531482 */
14541483
1484+ /**
1485+ * @api {delete } /topic/delete/:topicId Delete Topic
1486+ * @apiName DeleteTopic
1487+ * @apiGroup Topic
1488+ *
1489+ * @apiParam {String} topicId The ID of the Topic document to delete.
1490+ *
1491+ * @apiSuccess {String} res Success message indicating the deletion.
1492+ *
1493+ * @apiError (Error 500) DatabaseError Error message if there was an error during the deletion.
1494+ */
1495+
14551496/**
14561497 * @api {delete } /faculty/delete/:facultyId Delete Faculty
14571498 * @apiName DeleteFaculty
14641505 * @apiError (Error 500) DatabaseError Error message if there was an error during the deletion.
14651506 */
14661507
1508+ /**
1509+ * @api {post } /topic/update/:id Update Topic
1510+ * @apiName UpdateTopic
1511+ * @apiGroup Topic
1512+ * @apiDescription Update existing topic data.
1513+ *
1514+ * @apiParam {String} id The topic document to update.
1515+ *
1516+ * @apiSuccess {String} res Topic updated.
1517+ * @apiError (Error 500) DatabaseError Error in updating the database.
1518+ */
14671519/**
14681520 * @api {post } /faculty/update/:id Update Faculty
14691521 * @apiName UpdateFaculty
14921544 * @apiError (Error 500) DatabaseError Error in updating the database.
14931545 */
14941546
1547+ /**
1548+ * @api {get } /topic/list Get Topic List
1549+ * @apiName GetTopicList
1550+ * @apiGroup Topic
1551+ *
1552+ * @apiQuery {String} Title of the content(topic).
1553+ *
1554+ * @apiSuccess {Topic[]} res Array of filtered topic documents.
1555+ * @apiSuccess {String} topic._id ID of the topic document given by the database.
1556+ */
1557+
14951558/**
14961559 * @api {get } /faculty/list Get Faculty List
14971560 * @apiName GetFacultyList
15301593 * @apiSuccess {String[]} faculty.designation Faculty member's designation.
15311594 * @apiSuccess {String} faculty.natureOfAssociation Nature of association with the institution.
15321595 * @apiSuccess {String} faculty.additionalResponsibilities Additional responsibilities of the faculty.
1533- **/
1596+ **/
0 commit comments