@@ -666,6 +666,78 @@ define({
666666 "url" : "https://api.mchacks.ca/api/auth/password/forgot"
667667 } ]
668668 } ,
669+ {
670+ "type" : "get" ,
671+ "url" : "/auth/rolebindings/:id" ,
672+ "title" : "retrieve rolebindings for a user given by their user id :id" ,
673+ "name" : "getRoleBindings" ,
674+ "group" : "Authentication" ,
675+ "version" : "0.0.8" ,
676+ "parameter" : {
677+ "fields" : {
678+ "param" : [ {
679+ "group" : "param" ,
680+ "type" : "ObjectId" ,
681+ "optional" : false ,
682+ "field" : "id" ,
683+ "description" : "<p>MongoId of an account</p>"
684+ } ]
685+ }
686+ } ,
687+ "success" : {
688+ "fields" : {
689+ "Success 200" : [ {
690+ "group" : "Success 200" ,
691+ "type" : "string" ,
692+ "optional" : false ,
693+ "field" : "message" ,
694+ "description" : "<p>Success message</p>"
695+ } ,
696+ {
697+ "group" : "Success 200" ,
698+ "type" : "object" ,
699+ "optional" : false ,
700+ "field" : "data" ,
701+ "description" : "<p>Rolebindings object</p>"
702+ }
703+ ]
704+ } ,
705+ "examples" : [ {
706+ "title" : "Success-Response: " ,
707+ "content" : "{\n \"message\": \"Successfully retrieved role bindings\",\n \"data\": {\n accountId:\"5beca4ab2e069a34f91697b2\"\n id:\"5beca4ae2e069a34f91698b1\"\n roles: [\n {\n _id:\"5beca4ab2e069a34f91697d9\",\n name:\"hacker\",\n routes: [\n {_id: \"5beca4ae2e069a34f9169852\", requestType: \"POST\", uri: \"/api/auth/login\"},\n {_id: \"5beca4ae2e069a34f9169851\", requestType: \"POST\", uri: \"/api/auth/logout\"},\n {_id: \"5beca4ae2e069a34f9169850\", requestType: \"GET\", uri: \"/api/auth/rolebindings/:self\"},\n {_id: \"5beca4ae2e069a34f916984f\", requestType: \"GET\", uri: \"/api/account/self\"},\n {_id: \"5beca4ae2e069a34f916984e\", requestType: \"GET\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984d\", requestType: \"PATCH\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984c\", requestType: \"POST\", uri: \"/api/hacker/\"},\n {_id: \"5beca4ae2e069a34f916984b\", requestType: \"GET\", uri: \"/api/hacker/:self\"},\n {_id: \"5beca4ae2e069a34f916984a\", requestType: \"GET\", uri: \"/api/hacker/:self/resume\"},\n {_id: \"5beca4ae2e069a34f9169849\", requestType: \"PATCH\", uri: \"/api/hacker/:self\"}\n ]\n }\n ]\n }\n }" ,
708+ "type" : "object"
709+ } ]
710+ } ,
711+ "error" : {
712+ "fields" : {
713+ "Error 4xx" : [ {
714+ "group" : "Error 4xx" ,
715+ "type" : "string" ,
716+ "optional" : false ,
717+ "field" : "message" ,
718+ "description" : "<p>Error message</p>"
719+ } ,
720+ {
721+ "group" : "Error 4xx" ,
722+ "type" : "object" ,
723+ "optional" : false ,
724+ "field" : "data" ,
725+ "description" : "<p>empty</p>"
726+ }
727+ ]
728+ } ,
729+ "examples" : [ {
730+ "title" : "Error-Response: " ,
731+ "content" : "{\"message\": \"Role Bindings not found\", \"data\": {}}" ,
732+ "type" : "object"
733+ } ]
734+ } ,
735+ "filename" : "routes/api/auth.js" ,
736+ "groupTitle" : "Authentication" ,
737+ "sampleRequest" : [ {
738+ "url" : "https://api.mchacks.ca/api/auth/rolebindings/:id"
739+ } ]
740+ } ,
669741 {
670742 "type" : "get" ,
671743 "url" : "/auth/roles" ,
@@ -966,78 +1038,6 @@ define({
9661038 "url" : "https://api.mchacks.ca/api/auth/password/reset"
9671039 } ]
9681040 } ,
969- {
970- "type" : "get" ,
971- "url" : "/auth/rolebindings/:id" ,
972- "title" : "retrieve rolebindings for a user given by their user id :id" ,
973- "name" : "getRoleBindings" ,
974- "group" : "Auth" ,
975- "version" : "0.0.8" ,
976- "parameter" : {
977- "fields" : {
978- "param" : [ {
979- "group" : "param" ,
980- "type" : "ObjectId" ,
981- "optional" : false ,
982- "field" : "id" ,
983- "description" : "<p>MongoId of an account</p>"
984- } ]
985- }
986- } ,
987- "success" : {
988- "fields" : {
989- "Success 200" : [ {
990- "group" : "Success 200" ,
991- "type" : "string" ,
992- "optional" : false ,
993- "field" : "message" ,
994- "description" : "<p>Success message</p>"
995- } ,
996- {
997- "group" : "Success 200" ,
998- "type" : "object" ,
999- "optional" : false ,
1000- "field" : "data" ,
1001- "description" : "<p>Rolebindings object</p>"
1002- }
1003- ]
1004- } ,
1005- "examples" : [ {
1006- "title" : "Success-Response: " ,
1007- "content" : "{\n \"message\": \"Successfully retrieved role bindings\",\n \"data\": {\n accountId:\"5beca4ab2e069a34f91697b2\"\n id:\"5beca4ae2e069a34f91698b1\"\n roles: [\n {\n _id:\"5beca4ab2e069a34f91697d9\",\n name:\"hacker\",\n routes: [\n {_id: \"5beca4ae2e069a34f9169852\", requestType: \"POST\", uri: \"/api/auth/login\"},\n {_id: \"5beca4ae2e069a34f9169851\", requestType: \"POST\", uri: \"/api/auth/logout\"},\n {_id: \"5beca4ae2e069a34f9169850\", requestType: \"GET\", uri: \"/api/auth/rolebindings/:self\"},\n {_id: \"5beca4ae2e069a34f916984f\", requestType: \"GET\", uri: \"/api/account/self\"},\n {_id: \"5beca4ae2e069a34f916984e\", requestType: \"GET\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984d\", requestType: \"PATCH\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984c\", requestType: \"POST\", uri: \"/api/hacker/\"},\n {_id: \"5beca4ae2e069a34f916984b\", requestType: \"GET\", uri: \"/api/hacker/:self\"},\n {_id: \"5beca4ae2e069a34f916984a\", requestType: \"GET\", uri: \"/api/hacker/:self/resume\"},\n {_id: \"5beca4ae2e069a34f9169849\", requestType: \"PATCH\", uri: \"/api/hacker/:self\"}\n ]\n }\n ]\n }\n }" ,
1008- "type" : "object"
1009- } ]
1010- } ,
1011- "error" : {
1012- "fields" : {
1013- "Error 4xx" : [ {
1014- "group" : "Error 4xx" ,
1015- "type" : "string" ,
1016- "optional" : false ,
1017- "field" : "message" ,
1018- "description" : "<p>Error message</p>"
1019- } ,
1020- {
1021- "group" : "Error 4xx" ,
1022- "type" : "object" ,
1023- "optional" : false ,
1024- "field" : "data" ,
1025- "description" : "<p>empty</p>"
1026- }
1027- ]
1028- } ,
1029- "examples" : [ {
1030- "title" : "Error-Response: " ,
1031- "content" : "{\"message\": \"Role Bindings not found\", \"data\": {}}" ,
1032- "type" : "object"
1033- } ]
1034- } ,
1035- "filename" : "routes/api/auth.js" ,
1036- "groupTitle" : "Auth" ,
1037- "sampleRequest" : [ {
1038- "url" : "https://api.mchacks.ca/api/auth/rolebindings/:id"
1039- } ]
1040- } ,
10411041 {
10421042 "type" : "patch" ,
10431043 "url" : "/hacker/checkin/:id" ,
0 commit comments