Skip to content

Commit 208470e

Browse files
Merge pull request #394 from tcet-opensource/hotfixeslinttests1
[Fixed] Removed testcase residue, fixed ESLint issues
2 parents e440638 + 2f58cd3 commit 208470e

File tree

18 files changed

+293
-289
lines changed

18 files changed

+293
-289
lines changed

_apidoc.js

Lines changed: 52 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,12 @@
214214
* */
215215

216216
/**
217-
* @api {post} /infrastructure/update Update infrastructure details
217+
* @api {post} /infrastructure/update/:id Update infrastructure details
218218
* @apiName UpdateInfrastructure
219219
* @apiGroup Infrastructure
220220
* @apiDescription update Existing Infrastructure details
221221
*
222+
* @apiParam {String} id The infrastructure document to update.
222223
* @apiBody {String} id Id of the infrastructure to be updated
223224
* @apiBody {String} [name] The name of the infrastructure.
224225
* @apiBody {String} [type] The type of the infrastructure.
@@ -276,11 +277,12 @@
276277
* */
277278

278279
/**
279-
* @api {post} /accreditation/update update accreditation details
280+
* @api {post} /accreditation/update/:id update accreditation details
280281
* @apiName UpdateAccreditation
281282
* @apiGroup Accreditation
282283
* @apiDescription update Existing accreditation
283284
*
285+
* @apiParam {String} id The accreditation document to update.
284286
* @apiBody {String} id Id of the accreditation to be updated
285287
* @apiBody {String} [name] Accreditation name.
286288
* @apiBody {String} [agencyName] Agency name.
@@ -361,11 +363,12 @@
361363
*
362364
* */
363365
/**
364-
* @api {post} /tutorial/update Update tutorial details
366+
* @api {post} /tutorial/update/:id Update tutorial details
365367
* @apiName UpdateTutorial
366368
* @apiGroup Tutorial
367369
* @apiDescription update Existing Tutorial details
368370
*
371+
* @apiParam {String} id The tutorial document to update.
369372
* @apiBody {String} id Id of the tutorial to be updated
370373
* @apiBody {Number} [no] The no of tutorial.
371374
* @apiBody {String} [title] The title of tutorial.
@@ -473,11 +476,12 @@
473476
* */
474477

475478
/**
476-
* @api {post} /department/update Update department
479+
* @api {post} /department/update/:id Update department
477480
* @apiName UpdateDepartment
478481
* @apiGroup Department
479-
* @apiDescription Update Existing Department details except [yearOfStarting],[acronym]
482+
* @apiDescription Update Existing Department details except yearOfStarting, acronym
480483
*
484+
* @apiParam {String} id The department document to update.
481485
* @apiSuccess {String} department._id ID of document given by database.
482486
* @apiSuccess {String} department.name Name of Infrastructure
483487
* @apiSuccess {String} department.acronym The acronym of the Department.
@@ -548,11 +552,12 @@
548552
*/
549553

550554
/**
551-
* @api {post} /timetable/update Update Timetable
555+
* @api {post} /timetable/update/:id Update Timetable
552556
* @apiName UpdateTimetable
553557
* @apiGroup Timetable
554558
* @apiDescription Update existing timetable data.
555559
*
560+
* @apiParam {String} id The timetable document to update.
556561
* @apiBody {String} id ID of the timetable to be updated.
557562
* @apiBody {Date} [startDate] Start date of the timetable.
558563
* @apiBody {Date} [endDate] End date of the timetable.
@@ -568,11 +573,12 @@
568573
*/
569574

570575
/**
571-
* @api {post} /coursework/update Update Coursework
576+
* @api {post} /coursework/update/:id Update Coursework
572577
* @apiName UpdateCoursework
573578
* @apiGroup Coursework
574579
* @apiDescription Update existing coursework data.
575580
*
581+
* @apiParam {String} id The coursework document to update.
576582
* @apiBody {String} id ID of the Coursework to be updated.
577583
* @apiBody {ObjectId} student ID of the student (ObjectId).
578584
* @apiBody {String} Coursework type that is either onCampus or offCampus.
@@ -670,15 +676,15 @@
670676
* @api {post} /module/add Add Module
671677
* @apiName AddModule
672678
* @apiGroup Module
673-
*
679+
*
674680
* @apiBody {Number} [no] Module number.
675681
* @apiBody {String} [name] Name of the module.
676682
* @apiBody {String} [outcome] Module outcome.
677683
* @apiBody {String[]} [contents] Array of contents of the module.
678684
* @apiBody {Number} [hrsPerModule] Number of hours required per module.
679685
* @apiBody {String[]} [cognitiveLevels] Array of cognitive levels
680686
* of attainment as per Bloom's Taxanomy (L1-L6).
681-
*
687+
*
682688
* @apiSuccess {String} res added Module
683689
* @apiError (Error 500) Error while inserting in DB
684690
*/
@@ -687,7 +693,7 @@
687693
* @api {delete} /module/delete/:moduleId Delete Module
688694
* @apiName DeleteModule
689695
* @apiGroup Module
690-
*
696+
*
691697
* @apiParam {String} moduleId The ID of the Module document to delete.
692698
*
693699
* @apiSuccess {String} res Success message indicating the deletion.
@@ -696,11 +702,12 @@
696702
*/
697703

698704
/**
699-
* @api {post} /module/update/:moduleId Update Module
705+
* @api {post} /module/update/:moduleId Update Module
700706
* @apiName UpdateModule
701707
* @apiGroup Module
702708
* @apiDescription Update existing module data.
703709
*
710+
* @apiParam {String} moduleId The ID of the Module document to update.
704711
* @apiBody {Number} [no] Module number.
705712
* @apiBody {String} [name] Name of the module.
706713
* @apiBody {String} [outcome] Module outcome.
@@ -721,12 +728,12 @@
721728
* @api {get} /organization/list Get Organisation List
722729
* @apiName GetOrganizationList
723730
* @apiGroup Organization
724-
*
731+
*
725732
* @apiQuery [parent] Id of the parent of the organization
726733
* @apiQuery [startDate] starting date of the organization
727734
* @apiQuery [name] name of the organization
728735
* @apiQuery [accreditations] accreditation Id of the organization
729-
*
736+
*
730737
* @apiSuccess {Orgaization[]} res array of filtered organization Doc
731738
* @apiSuccess {ObjectId} organization.parent Id of the parent of the organization
732739
* @apiSuccess {Date} organization.startDate starting date of the organization
@@ -738,12 +745,12 @@
738745
* @api {post} /organization/add Add Organisation
739746
* @apiName AddOrganization
740747
* @apiGroup Organization
741-
*
748+
*
742749
* @apiBody {ObjectId} [parent] Id of the parent of the organization
743750
* @apiBody {Date} [startDate] starting date of the organization
744751
* @apiBody {String} [name] name of the organization
745752
* @apiBody {ObjectId} [accreditations] accreditation Id of the organization
746-
*
753+
*
747754
* @apiSuccess {String} res added organization
748755
* @apiError (Error 500) Error while inserting in DB
749756
*/
@@ -752,7 +759,7 @@
752759
* @api {delete} /organization/delete/:organizationId Delete Organization
753760
* @apiName DeleteOrganization
754761
* @apiGroup Organization
755-
*
762+
*
756763
* @apiParam {String} organizationId The ID of the Organization document to delete.
757764
*
758765
* @apiSuccess {String} res Success message indicating the deletion.
@@ -810,7 +817,7 @@
810817
* @apiDescription Remove the existing Paper.
811818
* @apiGroup Paper
812819
*
813-
* @apiParam {String} answersheetID The ID of the answersheet to delete.
820+
* @apiParam {String} id The ID of the Paper document to delete.
814821
*
815822
* @apiSuccess {String} res Paper deleted successfully.
816823
*
@@ -824,7 +831,7 @@
824831
/**
825832
* @api {post} /assignment/add Add assignment
826833
* @apiName Addassignment
827-
* @apiGroup assignment
834+
* @apiGroup Assignment
828835
* @apiDescription Add a new assignment.
829836
*
830837
* @apiBody {String} no Assignment number.
@@ -896,6 +903,7 @@
896903
* @apiName UpdatePractical
897904
* @apiGroup Practical
898905
*
906+
* @apiParam {String} id The ID of the Practical document to delete.
899907
* @apiBody {String} id ID of the Practical entity to update.
900908
* @apiBody {Number} [no] New Practical number.
901909
* @apiBody {String} [title] New title.
@@ -989,35 +997,37 @@
989997
* */
990998

991999
/**
992-
* @api {post} /paper/update/ Update Paper
1000+
* @api {post} /paper/update/:id Update Paper
9931001
* @apiName UpdatePaper
9941002
* @apiGroup Paper
995-
* @apiDescription Update Existing Paper details except
1003+
* @apiDescription Update Existing Paper details except
9961004
*
1005+
* @apiParam {String} id The paper document to update.
9971006
* @apiSuccess {Paper[]} res Array of Filtered Paper Doc .
9981007
* @apiSuccess {String} paper._id ID of paper given by database.
9991008
* @apiSuccess {String} paper.answersheetID Name of Infrastructure
10001009
* @apiSuccess {connector.Schema.Types.ObjectId} paper.exam associated Exam.
10011010
* @apiSuccess {connector.Schema.Types.ObjectId} paper.student associated Student.
10021011
* @apiSuccess {connector.Schema.Types.ObjectId} paper.faculty associated Faculty.
10031012
* @apiSuccess {Number} paper.marks The marks in the Paper.
1004-
*
1013+
*
10051014
* @apiSuccess {String} res Paper updated successfully.
1006-
*
1015+
*
10071016
* @apiError (Error 500) err Error while updating the data.s
10081017
*/
10091018

10101019
/**
1011-
* @api {post} /assignment/update update assignment details
1020+
* @api {post} /assignment/update/:id update assignment details
10121021
* @apiName UpdateAssignment
10131022
* @apiGroup Assignment
10141023
* @apiDescription update Existing assignment
10151024
*
1025+
* @apiParam {String} id The assignment document to update.
10161026
* @apiBody {String} id Id of the assignment to be updated
10171027
* @apiBody {String} [no] Assignment number.
10181028
* @apiBody {String} [title] assignment title.
10191029
* @apiBody {String} [type] type of assignment.
1020-
* @apiBody {Number} [marks] marks in assignment.
1030+
* @apiBody {Number} [marks] marks in assignment.
10211031
*
10221032
* @apiSuccess {String} res Assignment updated.
10231033
* @apiError (Error 500) err Error in updating database
@@ -1032,14 +1042,14 @@
10321042
* @apiBody {String} [no] Number of assignment.
10331043
* @apiBody {String} [title] Title of assignment.
10341044
* @apiBody {String} [type] type of assignment.
1035-
* @apiBody {Number} [marks] marks in assignment.
1045+
* @apiBody {Number} [marks] marks in assignment.
10361046
*
10371047
* @apiSuccess {assignment[]} res Array of Filtered assignment Doc.
10381048
* @apiSuccess {String} assignment._id ID of document given by database.
10391049
* @apiBody {String} [no] Number of assignment.
10401050
* @apiBody {String} [title] Title of assignment.
10411051
* @apiBody {String} [type] type of assignment.
1042-
* @apiBody {Number} [marks] marks in assignment.
1052+
* @apiBody {Number} [marks] marks in assignment.
10431053
*/
10441054

10451055
// ------------------------------------------------------------------------------------------
@@ -1082,17 +1092,18 @@
10821092
*/
10831093

10841094
/**
1085-
* @api {update} /semester/update/:id Request to list Semester information
1095+
* @api {update} /semester/update/:id Request to update Semester information
10861096
* @apiName Updatesemester
10871097
* @apiGroup Semester
10881098
*
1099+
* @apiParam {String} id The ID of the Semester document to update.
10891100
* @apiBody {Number} [number] Number of semester
10901101
* @apiBody {String} [academicYear] To show the current academic year
10911102
* @apiBody {String} [type] Stores the enum ODD or EVEN for semester
10921103
* @apiBody {Date} [startDate] Start date of the semester
10931104
* @apiBody {Date} [endDate] End date of the semester
10941105
*
1095-
*@apiSuccess {String} res Semester updated.
1106+
* @apiSuccess {String} res Semester updated.
10961107
* @apiError (Error 500) DatabaseError Error in updating the database.
10971108
*
10981109
*/
@@ -1202,13 +1213,13 @@
12021213
* @api {post} /organization/update/:organizationId Update Organisation
12031214
* @apiName UpdateOrganization
12041215
* @apiGroup Organization
1205-
*
1206-
* @apiBody {String} organizationId The ID of the Organization document to update
1216+
*
1217+
* @apiParam {String} organizationId The ID of the organization document to update.
12071218
* @apiBody {ObjectId} [parent] Id of the parent of the organization
12081219
* @apiBody {Date} [startDate] starting date of the organization
12091220
* @apiBody {String} [name] name of the organization
12101221
* @apiBody {ObjectId} [accreditations] accreditation Id of the organization
1211-
*
1222+
*
12121223
* @apiSuccess {String} res organization updated
12131224
* @apiError (Error 500) Error while inserting in DB
12141225
*/
@@ -1218,19 +1229,20 @@
12181229
* @apiName DeleteActivity
12191230
* @apiGroup Activity
12201231
*
1221-
* @apiParam {String} Activity The activity document to delete.
1232+
* @apiParam {String} activity The activity document to delete.
12221233
*
12231234
* @apiSuccess {String} res Success message indicating the deletion.
12241235
*
12251236
* @apiError (Error 500) DatabaseError Error message if there was an error during the deletion.
12261237
*/
12271238

12281239
/**
1229-
* @api {post} /timetable/update Update Timetable
1240+
* @api {post} /activity/update/:id Update Activity
12301241
* @apiName UpdateTimetable
12311242
* @apiGroup Timetable
12321243
* @apiDescription Update existing timetable data.
12331244
*
1245+
* @apiParam {String} id The timetable document to update.
12341246
* @apiBody {Date} startTime The startTime of the activity.
12351247
* @apiBody {Number} duration The duration of the activity (in minutes).
12361248
* @apiBody {ObjectId} course The course of the activity (ObjectId).
@@ -1244,11 +1256,12 @@
12441256
*/
12451257

12461258
/**
1247-
* @api {post} /activity/update Update Activity.
1259+
* @api {post} /activity/update/:id Update Activity.
12481260
* @apiName UpdateActivity
12491261
* @apiGroup Activity
12501262
* @apiDescription Update existing activity data.
12511263
*
1264+
* @apiParam {String} id The activity document to update.
12521265
* @apiBody {Date} startTime The startTime of the activity.
12531266
* @apiBody {Number} duration The duration of the activity (in minutes).
12541267
* @apiBody {ObjectId} course The course of the activity (ObjectId).
@@ -1283,7 +1296,7 @@
12831296
* @apiSuccess {String} type The type of activity.One of possible LECTURE, PRACTICAL, TUTORIAL.
12841297
* @apiSuccess {ObjectId} task The task of the activity (ObjectId).One of possible Topic,Practical,Tutorial.
12851298
* @apiSuccess {ObjectId} group The group of the activity (ObjectId).
1286-
* @apiSucess {ObjectId} students the students who gonna attend the activity(ObjectId).
1299+
* @apiSuccess {ObjectId} students the students who gonna attend the activity(ObjectId).
12871300
*/
12881301

12891302
/**
@@ -1307,7 +1320,7 @@
13071320
* @apiSuccess {String} type The type of activity.One of possible LECTURE, PRACTICAL, TUTORIAL.
13081321
* @apiSuccess {ObjectId} task The task of the activity (ObjectId).One of possible Topic,Practical,Tutorial.
13091322
* @apiSuccess {ObjectId} group The group of the activity (ObjectId).
1310-
* @apiSucess {ObjectId} students the students who gonna attend the activity(ObjectId).
1323+
* @apiSuccess {ObjectId} students the students who gonna attend the activity(ObjectId).
13111324
*/
13121325

13131326
// ------------------------------------------------------------------------------------------
@@ -1357,11 +1370,12 @@
13571370
*/
13581371

13591372
/**
1360-
* @api {post} /student/update Update Student
1373+
* @api {post} /student/update/:id Update Student
13611374
* @apiName UpdateStudent
13621375
* @apiGroup Student
13631376
* @apiDescription Update existing student data.
13641377
*
1378+
* @apiParam {String} id The student document to update.
13651379
* @apiBody {String} ERP ID of the student.
13661380
* @apiBody {String} name of the student.
13671381
* @apiBody {Number} joining year of the student.
@@ -1396,4 +1410,4 @@
13961410
* @apiSuccess {String} student.division of the student.
13971411
* @apiSuccess {Number} student.roll no of the student.
13981412
* @apiSuccess {ObjectId} student.coursesOpted by the student(ObjectId).
1399-
*/
1413+
*/

0 commit comments

Comments
 (0)