Skip to content

Commit 909bb59

Browse files
authored
Develop into Master (#292)
* WIP role create route * Change role service async calls to be in line with other services * Write stats route * Update docs * Add tests * Add role to vs code debugger * Add role services * Fix false async * create role middleware * role error constants and add to app.js * create role controller * WIP role route and role route tests * Fix crucial bug, add additional search feature * Update documentation * Make test more descriptive * Move variable to constants file * create /api/role/ route * Add success constants * Add tests * Fix validator logic * fix bugs with services with missing await * comenting and documentation * Constants/successes (#213) * Fix mention of docs to reflect new docs address * version 1.1.0 * version 1.1.1 * allow booleanValidator to take comparator value for codeOfConduct * Create tests for false codeOfConduct in hacker * Move success messages to constants file * add missing success message * Add comments, change tests a little * Remove duplicate check * Fix develop (#223) * Fix mention of docs to reflect new docs address * version 1.1.0 * version 1.1.1 * allow booleanValidator to take comparator value for codeOfConduct * Create tests for false codeOfConduct in hacker * Separate account read into controller and middleware * Move findbyid into middleware * Separate sponsor controller in to middleware and controller * Split team into middleware * Split volunteer creation into middleware and controller * Fix tests * Add teamId to hacker * Combine name and pronoun validators with duplicate logic into ascii validator * change all name and pronoun validator to ascii validator * Merge validations * Update parsehacker to include teamId * Create checks for team size for update * WIP join team route * Controller and WIP tests * remove async, make devpost optional * Fix typos and merge constants * wip auth * switch names to success.constant * wip tests * Bump winston from 2.4.2 to 2.4.4 Bumps [winston](https://github.com/winstonjs/winston) from 2.4.2 to 2.4.4. - [Release notes](https://github.com/winstonjs/winston/releases) - [Changelog](https://github.com/winstonjs/winston/blob/2.4.4/CHANGELOG.md) - [Commits](winstonjs/winston@2.4.2...2.4.4) Signed-off-by: dependabot[bot] <support@dependabot.com> * Bump jshint from 2.9.6 to 2.9.7 Bumps [jshint](https://github.com/jshint/jshint) from 2.9.6 to 2.9.7. - [Release notes](https://github.com/jshint/jshint/releases) - [Changelog](https://github.com/jshint/jshint/blob/master/CHANGELOG.md) - [Commits](jshint/jshint@2.9.6...2.9.7) Signed-off-by: dependabot[bot] <support@dependabot.com> * Bump express-validator from 5.2.0 to 5.3.1 Bumps [express-validator](https://github.com/express-validator/express-validator) from 5.2.0 to 5.3.1. - [Release notes](https://github.com/express-validator/express-validator/releases) - [Commits](express-validator/express-validator@v5.2.0...v5.3.1) Signed-off-by: dependabot[bot] <support@dependabot.com> * Bump chai from 4.1.2 to 4.2.0 Bumps [chai](https://github.com/chaijs/chai) from 4.1.2 to 4.2.0. - [Release notes](https://github.com/chaijs/chai/releases) - [Changelog](https://github.com/chaijs/chai/blob/master/History.md) - [Commits](chaijs/chai@4.1.2...4.2.0) Signed-off-by: dependabot[bot] <support@dependabot.com> * Bump express-winston from 2.5.1 to 2.6.0 Bumps [express-winston](https://github.com/bithavoc/express-winston) from 2.5.1 to 2.6.0. - [Release notes](https://github.com/bithavoc/express-winston/releases) - [Changelog](https://github.com/bithavoc/express-winston/blob/master/CHANGELOG.md) - [Commits](https://github.com/bithavoc/express-winston/commits/v2.6.0) Signed-off-by: dependabot[bot] <support@dependabot.com> * Bump @types/mongoose from 5.0.13 to 5.3.5 Bumps [@types/mongoose](https://github.com/DefinitelyTyped/DefinitelyTyped) from 5.0.13 to 5.3.5. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits) Signed-off-by: dependabot[bot] <support@dependabot.com> * Bump @types/google-cloud__storage from 1.7.1 to 1.7.2 Bumps [@types/google-cloud__storage](https://github.com/DefinitelyTyped/DefinitelyTyped) from 1.7.1 to 1.7.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits) Signed-off-by: dependabot[bot] <support@dependabot.com> * Bump apidoc from 0.17.6 to 0.17.7 Bumps [apidoc](https://github.com/apidoc/apidoc) from 0.17.6 to 0.17.7. - [Release notes](https://github.com/apidoc/apidoc/releases) - [Changelog](https://github.com/apidoc/apidoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/apidoc/apidoc/commits) Signed-off-by: dependabot[bot] <support@dependabot.com> * Bump cors from 2.8.4 to 2.8.5 Bumps [cors](https://github.com/expressjs/cors) from 2.8.4 to 2.8.5. - [Release notes](https://github.com/expressjs/cors/releases) - [Changelog](https://github.com/expressjs/cors/blob/master/HISTORY.md) - [Commits](expressjs/cors@v2.8.4...v2.8.5) Signed-off-by: dependabot[bot] <support@dependabot.com> * Bump @types/mongodb from 3.0.18 to 3.1.18 Bumps [@types/mongodb](https://github.com/DefinitelyTyped/DefinitelyTyped) from 3.0.18 to 3.1.18. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits) Signed-off-by: dependabot[bot] <support@dependabot.com> * More test cases * Bump mongoose from 5.1.0 to 5.4.1 Bumps [mongoose](https://github.com/Automattic/mongoose) from 5.1.0 to 5.4.1. - [Release notes](https://github.com/Automattic/mongoose/releases) - [Changelog](https://github.com/Automattic/mongoose/blob/master/History.md) - [Commits](Automattic/mongoose@5.1.0...5.4.1) Signed-off-by: dependabot[bot] <support@dependabot.com> * update npm packages * Fix typo * Fix typos and make sure tests work * Add documentation and comments * remove WIP material * Remove debug constants * Change team services to also update hacker * Bump dotenv from 5.0.1 to 6.2.0 (#240) Bumps [dotenv](https://github.com/motdotla/dotenv) from 5.0.1 to 6.2.0. - [Release notes](https://github.com/motdotla/dotenv/releases) - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md) - [Commits](motdotla/dotenv@v5.0.1...v6.2.0) Signed-off-by: dependabot[bot] <support@dependabot.com> * Update regex pattern * change to enum validation (#259) * Revert "Bump jsonwebtoken from 8.3.0 to 8.4.0" This reverts commit e1cb108. * Revert "Bump bcrypt from 3.0.0 to 3.0.3" This reverts commit e40d783. * Revert "Bump @google-cloud/storage from 2.3.1 to 2.3.4" This reverts commit 1b4c8a2. * Revert "Bump nodemon from 1.17.3 to 1.18.9" This reverts commit 8b09373. * Revert "Bump @types/express from 4.11.1 to 4.16.0" This reverts commit 24f564e. * Revert "Bump multer from 1.3.1 to 1.4.1" This reverts commit c05f136. * Revert "Bump express from 4.16.3 to 4.16.4" This reverts commit d9ce20d. * Revert "Bump chai-http from 4.0.0 to 4.2.0" This reverts commit fc1f73d. * Revert "version 1.1.2" This reverts commit 4c81019. * Revert "Develop (#225)" This reverts commit 24a2748. * Bump chai-http from 4.0.0 to 4.2.1 Bumps [chai-http](https://github.com/chaijs/chai-http) from 4.0.0 to 4.2.1. - [Release notes](https://github.com/chaijs/chai-http/releases) - [Changelog](https://github.com/chaijs/chai-http/blob/master/History.md) - [Commits](chaijs/chai-http@4.0.0...4.2.1) Signed-off-by: dependabot[bot] <support@dependabot.com> * Bump @types/mongoose from 5.3.5 to 5.3.6 Bumps [@types/mongoose](https://github.com/DefinitelyTyped/DefinitelyTyped) from 5.3.5 to 5.3.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits) Signed-off-by: dependabot[bot] <support@dependabot.com> * change errors * Bump mongoose from 5.4.1 to 5.4.2 Bumps [mongoose](https://github.com/Automattic/mongoose) from 5.4.1 to 5.4.2. - [Release notes](https://github.com/Automattic/mongoose/releases) - [Changelog](https://github.com/Automattic/mongoose/blob/master/History.md) - [Commits](Automattic/mongoose@5.4.1...5.4.2) Signed-off-by: dependabot[bot] <support@dependabot.com> * Bump @types/mongoose from 5.3.6 to 5.3.7 Bumps [@types/mongoose](https://github.com/DefinitelyTyped/DefinitelyTyped) from 5.3.6 to 5.3.7. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits) Signed-off-by: dependabot[bot] <support@dependabot.com> * Make projectName optional * add next * Fix bug where new Team validator looked for name, not teamName * Update docs * Change all instances of teamName to name * Add check for hacker joining same team * comments * Make more items editable (#269) * Make more items editable * Update docs * Add flags to mongoose connection (#272) * Add invite route (#252) * Add invite route * Documentation * Feature/team get (#270) * Add routes and roles * add showTeam with member names * create tests * Create middleware to display member names and add auth * documentation and function commenting * add some more test details * docs and typo * Change findMemberNames to use Mongoose.populate * Change documentation to so param type is ObjectId * Move id for get to be in req.param * Fix documentation, make test cases more detailed * Feature/team post (#273) * change to enum validation * Add authentication to team create * Create team * Add tests for team * WIP team post duplication issue * Add check for duplicate team name, and test for hacker already being in a team * uncomment tests * fix git merge mistake * Remove testing code, make sure create also updates hacker * docs * Remove test index * re-add index on team name * fix merge issue * Feature/274 stats query (#275) * Add query param to stats * Docs * Fix test * Feature/278 team leave (#279) * Add route * Change success name, add tests * Fix api_data * Add removeTeamIfEmpty * Add leave to hackerRole * Bug fix * General team bugfixes * fn name change * Remove console.log * Change function name * Feature/team patch (#277) * WIP team patch * WIP team patch * docs and tests * fix merge issue * WIP patch * Commenting, fix parsePatch, remove unused function * PR comments * Description and errors * Fix bracket issue * Change link (#282) * Bump mongoose from 5.4.2 to 5.4.3 Bumps [mongoose](https://github.com/Automattic/mongoose) from 5.4.2 to 5.4.3. - [Release notes](https://github.com/Automattic/mongoose/releases) - [Changelog](https://github.com/Automattic/mongoose/blob/master/History.md) - [Commits](Automattic/mongoose@5.4.2...5.4.3) Signed-off-by: dependabot[bot] <support@dependabot.com> * create volunteer get route (#285) * create volunteer get route * docs * Finish route, add tests, update documentation (#289) HackerByEmail route, add tests, update documentation * 290 acceptance email (#291) * edits * typo
1 parent f5a57ef commit 909bb59

21 files changed

+753
-74
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.0
1+
1.3.0

assets/email/statusEmail/Accepted.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@
381381
Here are your next steps:
382382
<br><br>
383383
<li style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;" >Confirm your attendance on our hacker dashboard no later than
384-
(date)</li>
385-
<li style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;" >Join our FB group to mingle with other hackers coming to McHacks 6</li>
384+
Friday, January 18.</li>
385+
<li style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;" >Join our <a href="https://www.facebook.com/groups/mchacks6" style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;" >FB group</a> to mingle with other hackers coming to McHacks 6!</li>
386386
<br><br>
387387
We've received an overwhelming number of applicants this year for only
388388
600 spots. If you can no longer attend McHacks 6, please let us know by
@@ -443,4 +443,4 @@
443443
</center>
444444
</body>
445445

446-
</html>
446+
</html>

constants/error.constant.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const HACKER_404_MESSAGE = "Hacker not found";
55
const TEAM_404_MESSAGE = "Team not found";
66
const RESUME_404_MESSAGE = "Resume not found";
77
const SPONSOR_404_MESSAGE = "Sponsor not found";
8+
const VOLUNTEER_404_MESSAGE = "Volunteer not found";
89

910
const ACCOUNT_TYPE_409_MESSAGE = "Wrong account type";
1011
const SPONSOR_ID_409_MESSAGE = "Conflict with sponsor accountId link";
@@ -75,4 +76,5 @@ module.exports = {
7576
TEAM_NAME_409_MESSAGE: TEAM_NAME_409_MESSAGE,
7677
TEAM_JOIN_SAME_409_MESSAGE: TEAM_JOIN_SAME_409_MESSAGE,
7778
TEAM_READ_500_MESSAGE: TEAM_READ_500_MESSAGE,
79+
VOLUNTEER_404_MESSAGE: VOLUNTEER_404_MESSAGE,
7880
};

constants/role.constant.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const hackerRole = {
3535

3636
Constants.Routes.hackerRoutes.post,
3737
Constants.Routes.hackerRoutes.getSelfById,
38+
Constants.Routes.hackerRoutes.getSelfByEmail,
3839
Constants.Routes.hackerRoutes.getSelfResumeById,
3940
Constants.Routes.hackerRoutes.patchSelfById,
4041
Constants.Routes.hackerRoutes.patchSelfConfirmationById,
@@ -52,6 +53,7 @@ const volunteerRole = {
5253
"_id": mongoose.Types.ObjectId.createFromTime(3),
5354
"name": Constants.General.VOLUNTEER,
5455
"routes": [
56+
Constants.Routes.volunteerRoutes.getSelfById,
5557
Constants.Routes.volunteerRoutes.post,
5658

5759
Constants.Routes.hackerRoutes.patchAnyCheckInById,

constants/routes.constant.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ const hackerRoutes = {
6868
requestType: Constants.REQUEST_TYPES.GET,
6969
uri: "/api/hacker/" + Constants.ROLE_CATEGORIES.ALL,
7070
},
71+
"getSelfByEmail": {
72+
requestType: Constants.REQUEST_TYPES.GET,
73+
uri: "/api/hacker/email/" + Constants.ROLE_CATEGORIES.SELF,
74+
},
75+
"getAnyByEmail": {
76+
requestType: Constants.REQUEST_TYPES.GET,
77+
uri: "/api/hacker/email/" + Constants.ROLE_CATEGORIES.ALL,
78+
},
7179
"getSelfResumeById": {
7280
requestType: Constants.REQUEST_TYPES.GET,
7381
uri: "/api/hacker/resume/" + Constants.ROLE_CATEGORIES.SELF,
@@ -161,6 +169,14 @@ const teamRoutes = {
161169
};
162170

163171
const volunteerRoutes = {
172+
"getSelfById": {
173+
requestType: Constants.REQUEST_TYPES.GET,
174+
uri: "/api/volunteer/" + Constants.ROLE_CATEGORIES.SELF,
175+
},
176+
"getAnyById": {
177+
requestType: Constants.REQUEST_TYPES.GET,
178+
uri: "/api/volunteer/" + Constants.ROLE_CATEGORIES.ALL,
179+
},
164180
"post": {
165181
requestType: Constants.REQUEST_TYPES.POST,
166182
uri: "/api/volunteer/",

constants/success.constant.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const TEAM_UPDATE = "Team update successful.";
4141
const TEAM_READ = "Team retrieval successful.";
4242
const TEAM_HACKER_LEAVE = "Removal from team successful.";
4343

44+
const VOLUNTEER_GET_BY_ID = "Volunteer found by id";
4445
const VOLUNTEER_CREATE = "Volunteer creation successful.";
4546

4647
module.exports = {
@@ -84,5 +85,6 @@ module.exports = {
8485
TEAM_READ: TEAM_READ,
8586
TEAM_HACKER_LEAVE: TEAM_HACKER_LEAVE,
8687

88+
VOLUNTEER_GET_BY_ID: VOLUNTEER_GET_BY_ID,
8789
VOLUNTEER_CREATE: VOLUNTEER_CREATE,
8890
};

controllers/volunteer.controller.js

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,35 @@ const Constants = {
1010
}
1111

1212
/**
13-
* @async
1413
* @function createdVolunteer
1514
* @param {{body: {volunteer: {_id: ObjectId, accountId: ObjectId}}}} req
1615
* @param {*} res
17-
* @return {JSON} Success or error status
16+
* @return {JSON} Success status
1817
* @description Show the success message and the created volunteer
1918
*/
20-
async function createdVolunteer(req, res) {
21-
19+
function createdVolunteer(req, res) {
2220
return res.status(200).json({
2321
message: Constants.Success.VOLUNTEER_CREATE,
2422
data: req.body.volunteer
2523
});
2624
}
2725

26+
/**
27+
* @function showVolunteer
28+
* @param {{body: {volunteer: {_id: ObjectId, accountId: ObjectId}}}} req
29+
* @param {*} res
30+
* @return {JSON} Success status
31+
* @description Show the success message and retrieved volunteer
32+
*/
33+
function showVolunteer(req, res) {
34+
return res.status(200).json({
35+
message: Constants.Success.VOLUNTEER_GET_BY_ID,
36+
data: req.body.volunteer.toJSON()
37+
});
38+
}
39+
40+
2841
module.exports = {
2942
createdVolunteer: createdVolunteer,
43+
showVolunteer: showVolunteer,
3044
};

docs/api/api_data.js

Lines changed: 146 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,78 @@ define({
12481248
"url": "https://api.mchacks.ca/api/hacker/"
12491249
}]
12501250
},
1251+
{
1252+
"type": "get",
1253+
"url": "/hacker/email/:email",
1254+
"title": "get a hacker's information",
1255+
"name": "getHacker",
1256+
"group": "Hacker",
1257+
"version": "0.0.8",
1258+
"parameter": {
1259+
"fields": {
1260+
"param": [{
1261+
"group": "param",
1262+
"type": "String",
1263+
"optional": false,
1264+
"field": "email",
1265+
"description": "<p>a hacker's unique email</p>"
1266+
}]
1267+
}
1268+
},
1269+
"success": {
1270+
"fields": {
1271+
"Success 200": [{
1272+
"group": "Success 200",
1273+
"type": "String",
1274+
"optional": false,
1275+
"field": "message",
1276+
"description": "<p>Success message</p>"
1277+
},
1278+
{
1279+
"group": "Success 200",
1280+
"type": "Object",
1281+
"optional": false,
1282+
"field": "data",
1283+
"description": "<p>Hacker object</p>"
1284+
}
1285+
]
1286+
},
1287+
"examples": [{
1288+
"title": "Success-Response: ",
1289+
"content": "{\n \"message\": \"Successfully retrieved hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"portfolioURL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n \"jobInterest\":\"Internship\",\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"comments\":\"hi!\",\n \"essay\":\"Pls accept me\"\n },\n \"status\":\"Applied\",\n \"ethnicity\":[\"White or Caucasian\",\" Asian or Pacific Islander\"],\n \"accountId\":\"5bff2a35e533b0f6562b4998\",\n \"school\":\"McPherson College\",\n \"gender\":\"Female\",\n \"needsBus\":false,\n \"major\":\"Accounting\",\n \"graduationYear\":2019,\n \"codeOfConduct\":true,\n }\n }",
1290+
"type": "object"
1291+
}]
1292+
},
1293+
"error": {
1294+
"fields": {
1295+
"Error 4xx": [{
1296+
"group": "Error 4xx",
1297+
"type": "String",
1298+
"optional": false,
1299+
"field": "message",
1300+
"description": "<p>Error message</p>"
1301+
},
1302+
{
1303+
"group": "Error 4xx",
1304+
"type": "Object",
1305+
"optional": false,
1306+
"field": "data",
1307+
"description": "<p>empty</p>"
1308+
}
1309+
]
1310+
},
1311+
"examples": [{
1312+
"title": "Error-Response: ",
1313+
"content": "{\"message\": \"Hacker not found\", \"data\": {}}",
1314+
"type": "object"
1315+
}]
1316+
},
1317+
"filename": "routes/api/hacker.js",
1318+
"groupTitle": "Hacker",
1319+
"sampleRequest": [{
1320+
"url": "https://api.mchacks.ca/api/hacker/email/:email"
1321+
}]
1322+
},
12511323
{
12521324
"type": "get",
12531325
"url": "/hacker/:id",
@@ -1280,7 +1352,7 @@ define({
12801352
"type": "Object",
12811353
"optional": false,
12821354
"field": "data",
1283-
"description": "<p>Sponsor object</p>"
1355+
"description": "<p>Hacker object</p>"
12841356
}
12851357
]
12861358
},
@@ -2425,6 +2497,7 @@ define({
24252497
"name": "patchTeam",
24262498
"group": "Team",
24272499
"version": "0.0.8",
2500+
"description": "<p>We use hackerId instead of teamId because authorization requires a one-to-one mapping from param id to accountId, but we are not able to have that from teamId to accountId due to multiple members in a team. Instead, we use hackerId, as there is a 1 to 1 link between hackerId to teamId, and a 1 to 1 link between hackerId and accountId</p>",
24282501
"parameter": {
24292502
"fields": {
24302503
"param": [{
@@ -2561,6 +2634,78 @@ define({
25612634
"sampleRequest": [{
25622635
"url": "https://api.mchacks.ca/api/volunteer/"
25632636
}]
2637+
},
2638+
{
2639+
"type": "get",
2640+
"url": "/volunteer/:id",
2641+
"title": "get a volunteer's information",
2642+
"name": "getVolunteer",
2643+
"group": "Volunteer",
2644+
"version": "1.3.0",
2645+
"parameter": {
2646+
"fields": {
2647+
"param": [{
2648+
"group": "param",
2649+
"type": "ObjectId",
2650+
"optional": false,
2651+
"field": "id",
2652+
"description": "<p>a volunteer's unique mongoID</p>"
2653+
}]
2654+
}
2655+
},
2656+
"success": {
2657+
"fields": {
2658+
"Success 200": [{
2659+
"group": "Success 200",
2660+
"type": "String",
2661+
"optional": false,
2662+
"field": "message",
2663+
"description": "<p>Success message</p>"
2664+
},
2665+
{
2666+
"group": "Success 200",
2667+
"type": "Object",
2668+
"optional": false,
2669+
"field": "data",
2670+
"description": "<p>Volunteer object</p>"
2671+
}
2672+
]
2673+
},
2674+
"examples": [{
2675+
"title": "Success-Response: ",
2676+
"content": "{\n \"message\": \"Successfully retrieved volunteer information\", \n \"data\": {...}\n }",
2677+
"type": "object"
2678+
}]
2679+
},
2680+
"error": {
2681+
"fields": {
2682+
"Error 4xx": [{
2683+
"group": "Error 4xx",
2684+
"type": "String",
2685+
"optional": false,
2686+
"field": "message",
2687+
"description": "<p>Error message</p>"
2688+
},
2689+
{
2690+
"group": "Error 4xx",
2691+
"type": "Object",
2692+
"optional": false,
2693+
"field": "data",
2694+
"description": "<p>empty</p>"
2695+
}
2696+
]
2697+
},
2698+
"examples": [{
2699+
"title": "Error-Response: ",
2700+
"content": "{\"message\": \"Volunteer not found\", \"data\": {}}",
2701+
"type": "object"
2702+
}]
2703+
},
2704+
"filename": "routes/api/volunteer.js",
2705+
"groupTitle": "Volunteer",
2706+
"sampleRequest": [{
2707+
"url": "https://api.mchacks.ca/api/volunteer/:id"
2708+
}]
25642709
}
25652710
]
25662711
});

0 commit comments

Comments
 (0)