Skip to content

Commit

Permalink
Merge pull request #37 from sdslabs/response-status
Browse files Browse the repository at this point in the history
Update the APIs of Response
  • Loading branch information
blackbird7112 authored Sep 1, 2022
2 parents 2e21ae5 + 31900b9 commit 0fc287d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 15 deletions.
60 changes: 46 additions & 14 deletions Quizio.postman_collection.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info": {
"_postman_id": "75a3a296-f006-4a0c-8531-ab8ab4dd7a5f",
"_postman_id": "2f85b032-0452-4bdb-9199-73d495fd7ae9",
"name": "Quizio",
"description": "# Introduction\nWhat does your API do?\n\n# Overview\nThings that the developers should know about\n\n# Authentication\nWhat is the preferred way of using the API?\n\n# Error Codes\nWhat errors and status codes can a user expect?\n\n# Rate limit\nIs there a limit to the number of requests a user can send?",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
Expand Down Expand Up @@ -1446,30 +1446,62 @@
},
{
"name": "Get response",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"userID\": \"quizioID.0MDZe6Hody7QyMHecl_dX\",\n \"questionID\" : \"quizioID.Ze2vQjTx7GjtpiVvqIFSP\"\n}",
"options": {
"raw": {
"language": "json"
"url": {
"raw": "{{baseURL}}/api/v2/responses/:userID/:questionID",
"host": [
"{{baseURL}}"
],
"path": [
"api",
"v2",
"responses",
":userID",
":questionID"
],
"variable": [
{
"key": "userID",
"value": "quizioID.DqikbjznoFpmhPOGxUBK1"
},
{
"key": "questionID",
"value": "quizioID.IQHgP9Tmi37vWhu_Dx3g9"
}
}
},
]
}
},
"response": []
},
{
"name": "Get Response Status of All Questions",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseURL}}/api/v2/responses",
"raw": "{{baseURL}}/api/v2/responses/status/:userID/:quizID",
"host": [
"{{baseURL}}"
],
"path": [
"api",
"v2",
"responses"
"responses",
"status",
":userID",
":quizID"
],
"variable": [
{
"key": "userID",
"value": "quizioID.DqikbjznoFpmhPOGxUBK1"
},
{
"key": "quizID",
"value": "quizioID.fnX4BeKbCQlsfqxg-e1dV"
}
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const MONGOURI = getMongoURI();
// Connect to db
mongoose.connect(MONGOURI).then(() => logger
.info('MongoDB successfully connected'))
.catch((err) => logger.error(err));
.catch((err) => logger.error(`MongoDB connection failed: ${err}`));

// Start the server
server.listen(port, () => {
Expand Down

0 comments on commit 0fc287d

Please sign in to comment.