3244 lines
77 KiB
JSON
3244 lines
77 KiB
JSON
{
|
|
"info": {
|
|
"_postman_id": "b40f6440-9ac1-47c7-ab36-d67fd439b7ef",
|
|
"name": "ProjetBut3",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
|
|
"_exporter_id": "11504690"
|
|
},
|
|
"item": [
|
|
{
|
|
"name": "Auth",
|
|
"item": [
|
|
{
|
|
"name": "Is Logged in",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/authenticate",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"authenticate"
|
|
]
|
|
}
|
|
},
|
|
"response": [
|
|
{
|
|
"name": "Success",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/authenticate",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"authenticate"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Set-Cookie",
|
|
"value": "auth-token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2MWRkZTc0OTRiOWVhMjRhZjc3NjE0Y2IiLCJ1c2VybmFtZSI6Ikx1Y2FzU3RibnIiLCJwZXJtaXNzaW9uIjoxLCJjcmVhdGVEYXRlIjoiMTY0MTkzMjQ4Nzc1MCIsIl9fdiI6MCwiaWF0IjoxNjY0NDc2ODYzfQ.8vLLLmXaHoXNKwm-pQtxJAPm6JG_8a_lyx8UlGYxM1w; Max-Age=2678400; Path=/; Expires=Sun, 30 Oct 2022 18:42:27 GMT"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "422"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"1a6-u+66Y2/w0F1cFWHGkAcFdIfR3pY\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:42:27 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": true,\n \"data\": {\n \"user\": {\n \"_id\": \"61dde7494b9ea24af77614cb\",\n \"username\": \"LucasStbnr\",\n \"permission\": 1,\n \"createDate\": \"1641932487750\",\n \"__v\": 0,\n \"iat\": 1664476863,\n \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2MWRkZTc0OTRiOWVhMjRhZjc3NjE0Y2IiLCJ1c2VybmFtZSI6Ikx1Y2FzU3RibnIiLCJwZXJtaXNzaW9uIjoxLCJjcmVhdGVEYXRlIjoiMTY0MTkzMjQ4Nzc1MCIsIl9fdiI6MCwiaWF0IjoxNjY0NDc2ODYzfQ.8vLLLmXaHoXNKwm-pQtxJAPm6JG_8a_lyx8UlGYxM1w\"\n }\n }\n}"
|
|
},
|
|
{
|
|
"name": "Invalid token",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/authenticate",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"authenticate"
|
|
]
|
|
}
|
|
},
|
|
"status": "Bad Request",
|
|
"code": 400,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "41"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"29-k0YzYkgwBJyjAUq/gPAxv4/BSno\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:39:39 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Invalid token\"\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Login",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}\",\n \"password\": \"{{password}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/authenticate",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"authenticate"
|
|
]
|
|
}
|
|
},
|
|
"response": [
|
|
{
|
|
"name": "Success",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}\",\n \"password\": \"{{password}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/authenticate",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"authenticate"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Set-Cookie",
|
|
"value": "auth-token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2MWRkZTc0OTRiOWVhMjRhZjc3NjE0Y2IiLCJ1c2VybmFtZSI6Ikx1Y2FzU3RibnIiLCJwZXJtaXNzaW9uIjoxLCJjcmVhdGVEYXRlIjoiMTY0MTkzMjQ4Nzc1MCIsIl9fdiI6MCwiaWF0IjoxNjY0NDc2ODYzfQ.8vLLLmXaHoXNKwm-pQtxJAPm6JG_8a_lyx8UlGYxM1w; Max-Age=2678400; Path=/; Expires=Sun, 30 Oct 2022 18:41:03 GMT"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "405"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"195-fRMX8gcPzq54EhuK8H9mI0wE4L4\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:41:03 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": true,\n \"data\": {\n \"user\": {\n \"_id\": \"61dde7494b9ea24af77614cb\",\n \"username\": \"LucasStbnr\",\n \"permission\": 1,\n \"createDate\": \"1641932487750\",\n \"__v\": 0,\n \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2MWRkZTc0OTRiOWVhMjRhZjc3NjE0Y2IiLCJ1c2VybmFtZSI6Ikx1Y2FzU3RibnIiLCJwZXJtaXNzaW9uIjoxLCJjcmVhdGVEYXRlIjoiMTY0MTkzMjQ4Nzc1MCIsIl9fdiI6MCwiaWF0IjoxNjY0NDc2ODYzfQ.8vLLLmXaHoXNKwm-pQtxJAPm6JG_8a_lyx8UlGYxM1w\"\n }\n }\n}"
|
|
},
|
|
{
|
|
"name": "Some data is missing",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/authenticate",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"authenticate"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "48"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"30-nNyV/zh7KoZJ/YQEL1n2BAYYegg\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:40:27 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Some data is missing\"\n}"
|
|
},
|
|
{
|
|
"name": "Username or password incorrect",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}\",\n \"password\": \"{{password}}a\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/authenticate",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"authenticate"
|
|
]
|
|
}
|
|
},
|
|
"status": "Unauthorized",
|
|
"code": 401,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "58"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"3a-sSlZVKZumQTe4aHOCHN+oeI/mfI\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:40:45 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Username or password incorrect\"\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Logout",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/authenticate",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"authenticate"
|
|
]
|
|
}
|
|
},
|
|
"response": [
|
|
{
|
|
"name": "Success",
|
|
"originalRequest": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/authenticate",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"authenticate"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Set-Cookie",
|
|
"value": "auth-token=; Max-Age=-1; Path=/; Expires=Thu, 29 Sep 2022 18:42:52 GMT"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "16"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"10-oV4hJxRVSENxc/wX8+mA4/Pe4tA\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:42:52 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": true\n}"
|
|
},
|
|
{
|
|
"name": "Access denied",
|
|
"originalRequest": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/authenticate",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"authenticate"
|
|
]
|
|
}
|
|
},
|
|
"status": "Unauthorized",
|
|
"code": 401,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "41"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"29-61tmotkmnTwCcsouQR5Cq0D5ggA\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:43:03 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Access denied\"\n}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "User",
|
|
"item": [
|
|
{
|
|
"name": "Get user",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/user",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user"
|
|
],
|
|
"query": [
|
|
{
|
|
"key": "_id",
|
|
"value": "61dde7494b9ea24af77614ca",
|
|
"disabled": true
|
|
},
|
|
{
|
|
"key": "username",
|
|
"value": "",
|
|
"disabled": true
|
|
},
|
|
{
|
|
"key": "permission",
|
|
"value": "",
|
|
"disabled": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": [
|
|
{
|
|
"name": "Success",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/user",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "146"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"92-wRAzofKjhlngUs0uju+BzbVbcBY\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:44:02 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": true,\n \"data\": {\n \"users\": [\n {\n \"_id\": \"61dde7494b9ea24af77614cb\",\n \"username\": \"LucasStbnr\",\n \"permission\": 1,\n \"createDate\": \"1641932487750\",\n \"__v\": 0\n }\n ]\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Create user",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}a\",\n \"password\": \"{{password}}\",\n \"confirmation\": \"{{password}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user"
|
|
]
|
|
}
|
|
},
|
|
"response": [
|
|
{
|
|
"name": "Success",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}a\",\n \"password\": \"{{password}}\",\n \"confirmation\": \"{{password}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "193"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"c1-l8ljmPi3lCLKQGE5UXfTfXfixi8\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:58:54 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": true,\n \"data\": {\n \"user\": {\n \"username\": \"LucasStbnra\",\n \"permission\": 1,\n \"_id\": \"6335eaee8f3b06674271d339\",\n \"createdAt\": \"2022-09-29T18:58:54.889Z\",\n \"updatedAt\": \"2022-09-29T18:58:54.889Z\",\n \"__v\": 0\n }\n }\n}"
|
|
},
|
|
{
|
|
"name": "Confirmation is required",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}a\",\n \"password\": \"{{password}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "52"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"34-ISFLhc+RA+4RnUhRemN/oOat1WQ\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:49:32 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Confirmation is required\"\n}"
|
|
},
|
|
{
|
|
"name": "Confirmation is required",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"password\": \"{{password}}\",\n \"confirmation\": \"{{password}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "48"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"30-nNyV/zh7KoZJ/YQEL1n2BAYYegg\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:49:48 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Some data is missing\"\n}"
|
|
},
|
|
{
|
|
"name": "Username must be at least 3 characters long",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"a\",\n \"password\": \"{{password}}\",\n \"confirmation\": \"{{password}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "71"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"47-b4xW6pcg7zN48d2wMItD+EZWl84\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:50:14 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Username must be at least 3 characters long\"\n}"
|
|
},
|
|
{
|
|
"name": "Password must be at least 8 characters long",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}a\",\n \"password\": \"aa\",\n \"confirmation\": \"aa\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "71"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"47-2VS7vMPZZen3sG2LUKvETZhy5Ew\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:51:22 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Password must be at least 8 characters long\"\n}"
|
|
},
|
|
{
|
|
"name": "Password must contain at least one uppercase letter",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}a\",\n \"password\": \"aaaaaaaa\",\n \"confirmation\": \"aaaaaaaa\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "79"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"4f-9Ih/9Oph6iuOqfFkcC47GsqLDI8\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:51:52 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Password must contain at least one uppercase letter\"\n}"
|
|
},
|
|
{
|
|
"name": "Password must contain at least one lowercase letter",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}a\",\n \"password\": \"AAAAAAAA\",\n \"confirmation\": \"AAAAAAAA\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "79"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"4f-NQXMn3KFPYQvfpir6+nXyuj/zgo\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:52:11 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Password must contain at least one lowercase letter\"\n}"
|
|
},
|
|
{
|
|
"name": "Create user",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}a\",\n \"password\": \"AAAAAAAAa\",\n \"confirmation\": \"AAAAAAAAa\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "69"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"45-TVtKnuR1p1dHrZWqrz8QJGjUIvc\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:52:30 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Password must contain at least one number\"\n}"
|
|
},
|
|
{
|
|
"name": "Password must contain at least one special character",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}a\",\n \"password\": \"AAAAAAAAa0\",\n \"confirmation\": \"AAAAAAAAa0\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "80"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"50-ZMJ3FDMRhHMf8SMY4wW29zbRBTI\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:52:44 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Password must contain at least one special character\"\n}"
|
|
},
|
|
{
|
|
"name": "Data already exists",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}a\",\n \"password\": \"{{password}}\",\n \"confirmation\": \"{{password}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "47"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"2f-teRGqWb5583WuThzKV7uBkWQkkg\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:56:39 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Data already exists\"\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Update user",
|
|
"request": {
|
|
"method": "PUT",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}a\",\n \"password\": \"{{password}}\",\n \"confirmation\": \"{{password}}\",\n \"old_password\": \"{{password}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "6335eb118f3b06674271d33d"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": [
|
|
{
|
|
"name": "Success",
|
|
"originalRequest": {
|
|
"method": "PUT",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}a\",\n \"password\": \"{{password}}\",\n \"confirmation\": \"{{password}}\",\n \"old_password\": \"{{password}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "6335eb118f3b06674271d33d"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "555"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"22b-9CFiTx2Eeu0f2g1iVxRZNAhmimM\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 19:05:24 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": true,\n \"data\": {\n \"user\": {\n \"_id\": \"6335eb118f3b06674271d33d\",\n \"username\": \"LucasStbnra\",\n \"permission\": 1,\n \"createdAt\": \"2022-09-29T18:59:29.364Z\",\n \"updatedAt\": \"2022-09-29T19:05:24.447Z\",\n \"__v\": 0\n },\n \"token\": {\n \"success\": true,\n \"data\": {\n \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2MzM1ZWIxMThmM2IwNjY3NDI3MWQzM2QiLCJ1c2VybmFtZSI6Ikx1Y2FzU3RibnJhIiwicGVybWlzc2lvbiI6MSwiY3JlYXRlZEF0IjoiMjAyMi0wOS0yOVQxODo1OToyOS4zNjRaIiwidXBkYXRlZEF0IjoiMjAyMi0wOS0yOVQxOTowNToyNC40NDdaIiwiX192IjowLCJpYXQiOjE2NjQ0NzgzMjR9.vO70i6EhgWAejo3uG8rC0NVzDrF3K8GgOVxV08ACRss\"\n }\n }\n }\n}"
|
|
},
|
|
{
|
|
"name": "Unauthorized",
|
|
"originalRequest": {
|
|
"method": "PUT",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}\",\n \"password\": \"{{password}}\",\n \"confirmation\": \"{{password}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "6335eb118f3b06674271d33a"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "40"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"28-FUA6V4JbfRf7Mh4r5bmwNPsixTA\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 19:00:06 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Unauthorized\"\n}"
|
|
},
|
|
{
|
|
"name": "User not found",
|
|
"originalRequest": {
|
|
"method": "PUT",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}\",\n \"password\": \"{{password}}\",\n \"confirmation\": \"{{password}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "6335eb118f3b06674271d33a"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "42"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"2a-FQG5794dbhTyRwgytQ7rokul7mM\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 19:01:18 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"User not found\"\n}"
|
|
},
|
|
{
|
|
"name": "Password confirmation is required",
|
|
"originalRequest": {
|
|
"method": "PUT",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}\",\n \"password\": \"{{password}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "6335eb118f3b06674271d33d"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "61"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"3d-gZjZ0Rkie0ILkHNeFtaF36LZVE8\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 19:02:02 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Password confirmation is required\"\n}"
|
|
},
|
|
{
|
|
"name": "Old password is required",
|
|
"originalRequest": {
|
|
"method": "PUT",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"username\": \"{{username}}\",\n \"password\": \"{{password}}\",\n \"confirmation\": \"{{password}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/user/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "6335eb118f3b06674271d33d"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "52"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"34-LEyLNJlXGwAoAgSHQtV0EYkOQJ8\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 19:03:59 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Old password is required\"\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Delete user",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/user/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "6335eaee8f3b06674271d339"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": [
|
|
{
|
|
"name": "Success",
|
|
"originalRequest": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/user/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "6335eaee8f3b06674271d339"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "16"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"10-oV4hJxRVSENxc/wX8+mA4/Pe4tA\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:59:16 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": true\n}"
|
|
},
|
|
{
|
|
"name": "User not found",
|
|
"originalRequest": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/user/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"user",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "6335e9a521727b13d5a7bcfa"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "42"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"2a-FQG5794dbhTyRwgytQ7rokul7mM\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:58:00 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"User not found\"\n}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Room",
|
|
"item": [
|
|
{
|
|
"name": "Get rooms",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/room",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"room"
|
|
]
|
|
}
|
|
},
|
|
"response": [
|
|
{
|
|
"name": "Success",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/room",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"room"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "158"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"9e-b/pvDY2y4bDQ3ODm/PxMn0dppnA\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 19:13:51 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": true,\n \"data\": {\n \"rooms\": [\n {\n \"_id\": \"61e06d9f6a061e810904d932\",\n \"name\": \"Chambre\",\n \"user\": \"61dde7494b9ea24af77614cb\",\n \"createDate\": \"1642095622100\",\n \"__v\": 0\n }\n ]\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Get room",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/room/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"room",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "61e06d9f6a061e810904d932"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": [
|
|
{
|
|
"name": "Success",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/room/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"room",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "61e06d9f6a061e810904d932"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "1691"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"69b-vN1tu15JCWyKJQIshZbc8L7yFIw\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 19:14:26 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": true,\n \"data\": {\n \"room\": {\n \"_id\": \"61e06d9f6a061e810904d932\",\n \"name\": \"Chambre\",\n \"user\": \"61dde7494b9ea24af77614cb\",\n \"createDate\": \"1642095622100\",\n \"__v\": 0,\n \"items\": [\n {\n \"_id\": \"61e07007cf65426aa42c8ba2\",\n \"brand\": \"Apple\",\n \"model\": \"iPad Air\",\n \"user\": \"61dde7494b9ea24af77614cb\",\n \"room\": \"61e06d9f6a061e810904d932\",\n \"price\": 656.4,\n \"purchaseDate\": \"2021-11-22T00:00:00.000Z\",\n \"description\": \"iPad Maman\",\n \"createDate\": \"1642098182928\",\n \"__v\": 0,\n \"categories\": [\n \"Electronics\"\n ],\n \"link\": \"https://www.apple.com/fr/shop/buy-ipad/ipad-air\"\n },\n {\n \"_id\": \"61f437556235956ee51773a8\",\n \"brand\": \"Apple\",\n \"model\": \"iPhone 12\",\n \"user\": \"61dde7494b9ea24af77614cb\",\n \"room\": \"61e06d9f6a061e810904d932\",\n \"price\": 300,\n \"categories\": [],\n \"createDate\": \"1643394739921\",\n \"__v\": 0\n },\n {\n \"_id\": \"61f557d9681b1f2c5053867b\",\n \"brand\": \"Apple\",\n \"model\": \"test\",\n \"user\": \"61dde7494b9ea24af77614cb\",\n \"room\": \"61e06d9f6a061e810904d932\",\n \"price\": 555,\n \"categories\": [],\n \"createDate\": \"1643468147636\",\n \"__v\": 0\n },\n {\n \"_id\": \"61f55adeb43fd08bf5f6436b\",\n \"brand\": \"Celio\",\n \"user\": \"61dde7494b9ea24af77614cb\",\n \"room\": \"61e06d9f6a061e810904d932\",\n \"price\": 12,\n \"categories\": [],\n \"createDate\": \"1643469491752\",\n \"__v\": 0\n },\n {\n \"_id\": \"61f55b500a52c1f0cd88773f\",\n \"brand\": \"Bose\",\n \"model\": \"Qc 35\",\n \"user\": \"61dde7494b9ea24af77614cb\",\n \"room\": \"61e06d9f6a061e810904d932\",\n \"price\": 156,\n \"categories\": [],\n \"createDate\": \"1643469542957\",\n \"__v\": 0\n },\n {\n \"_id\": \"61f55c19315bd85c6cf0dbe6\",\n \"brand\": \"Bateau\",\n \"model\": \"zd\",\n \"user\": \"61dde7494b9ea24af77614cb\",\n \"room\": \"61e06d9f6a061e810904d932\",\n \"price\": 12,\n \"categories\": [],\n \"createDate\": \"1643469808572\",\n \"__v\": 0\n },\n {\n \"_id\": \"6204d7d646c69642006684d2\",\n \"brand\": \"Test\",\n \"model\": \"test\",\n \"user\": \"61dde7494b9ea24af77614cb\",\n \"room\": \"61e06d9f6a061e810904d932\",\n \"price\": 12.21,\n \"categories\": [],\n \"createDate\": \"1644483936235\",\n \"__v\": 0\n }\n ]\n }\n }\n}"
|
|
},
|
|
{
|
|
"name": "Room not found",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/room/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"room",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "61e06d9f6a061e810904d93a"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "42"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"2a-4rrHCeo3s1UKJx2teScomjgl5Co\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 19:14:10 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Room not found\"\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Get room stats",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/room/stats",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"room",
|
|
"stats"
|
|
]
|
|
}
|
|
},
|
|
"response": [
|
|
{
|
|
"name": "Success",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/room/stats",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"room",
|
|
"stats"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "367"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"16f-hMC8pjBqKKT/9BREyS2Eu9h9Lr8\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 19:16:36 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": true,\n \"data\": {\n \"stats\": {\n \"global\": {\n \"rooms_count\": 1,\n \"items_count\": 7,\n \"total_price\": 1703.61,\n \"average_price\": 243.37,\n \"most_item_room\": {\n \"name\": \"Chambre\",\n \"count\": 7\n },\n \"most_expensive_room\": {\n \"name\": \"Chambre\",\n \"count\": 1703.61\n }\n },\n \"rooms\": {\n \"Chambre\": {\n \"_id\": \"61e06d9f6a061e810904d932\",\n \"name\": \"Chambre\",\n \"items_count\": 7,\n \"room_price\": 1703.61\n }\n },\n \"years\": {\n \"2021\": 656.4,\n \"2022\": 0\n }\n }\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Create room",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"name\": \"test\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/room",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"room"
|
|
]
|
|
}
|
|
},
|
|
"response": [
|
|
{
|
|
"name": "Room name is missing",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/room",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"room"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "48"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"30-DtOm7zGa94Y5O/rTJZAlBGhv+qs\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 19:17:33 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Room name is missing\"\n}"
|
|
},
|
|
{
|
|
"name": "Success",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"name\": \"test\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/room",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"room"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "201"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"c9-VhYfBSTDSwIDiDT3GfIThuVvN1Q\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 19:21:02 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": true,\n \"data\": {\n \"room\": {\n \"name\": \"test\",\n \"user\": \"61dde7494b9ea24af77614cb\",\n \"_id\": \"6335f01e38dbc3eee97d1165\",\n \"createdAt\": \"2022-09-29T19:21:02.700Z\",\n \"updatedAt\": \"2022-09-29T19:21:02.700Z\",\n \"__v\": 0\n }\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Update room",
|
|
"request": {
|
|
"method": "PUT",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"name\": \"test\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/room/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"room",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "6335f01e38dbc3eee97d1165"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": [
|
|
{
|
|
"name": "Success",
|
|
"originalRequest": {
|
|
"method": "PUT",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"name\": \"test\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/room/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"room",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "6335f01e38dbc3eee97d1165"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "201"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"c9-8zn2VE+wCxQL8GZMn+PPWxXeDq0\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 19:21:51 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": true,\n \"data\": {\n \"room\": {\n \"_id\": \"6335f01e38dbc3eee97d1165\",\n \"name\": \"test\",\n \"user\": \"61dde7494b9ea24af77614cb\",\n \"createdAt\": \"2022-09-29T19:21:02.700Z\",\n \"updatedAt\": \"2022-09-29T19:21:50.942Z\",\n \"__v\": 0\n }\n }\n}"
|
|
},
|
|
{
|
|
"name": "Room not found",
|
|
"originalRequest": {
|
|
"method": "PUT",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"name\": \"test\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/room/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"room",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "61dfe8b374801e63c1ab1e47"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "42"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"2a-4rrHCeo3s1UKJx2teScomjgl5Co\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 19:21:28 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Room not found\"\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Delete room",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/room/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"room",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "6335ef5b38dbc3eee97d115d"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": [
|
|
{
|
|
"name": "Success",
|
|
"originalRequest": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/room/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"room",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "6335ef5b38dbc3eee97d115d"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "201"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"c9-1EqfbISgSrmQ2Nh6AqdfKO0lQcE\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 19:18:02 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": true,\n \"data\": {\n \"room\": {\n \"_id\": \"6335ef5b38dbc3eee97d115d\",\n \"name\": \"test\",\n \"user\": \"61dde7494b9ea24af77614cb\",\n \"createdAt\": \"2022-09-29T19:17:47.067Z\",\n \"updatedAt\": \"2022-09-29T19:17:47.067Z\",\n \"__v\": 0\n }\n }\n}"
|
|
},
|
|
{
|
|
"name": "Room not found",
|
|
"originalRequest": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/room/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"room",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "6335ef5b38dbc3eee97d115d"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "42"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"2a-4rrHCeo3s1UKJx2teScomjgl5Co\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 19:18:12 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": false,\n \"error\": \"Room not found\"\n}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Item",
|
|
"item": [
|
|
{
|
|
"name": "Get items",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/item",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"item"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Get item",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/item/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"item",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "61e07007cf65426aa42c8ba2"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Get brands name",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/item/brands",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"item",
|
|
"brands"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Create item",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"brand\": \"iPad\",\n \"model\": \"Air\",\n \"room\": \"65d5143e29e23cd6c2018c6b\",\n \"price\": 100,\n \"purchaseDate\": \"2014\",\n \"description\": \"\",\n \"link\": \"\",\n \"categories\": []\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/item",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"item"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Set invoice",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"_id\": \"\",\n \"filename\": \"\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/item/:_id/invoice",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"item",
|
|
":_id",
|
|
"invoice"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "61e07007cf65426aa42c8ba2"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Update item",
|
|
"request": {
|
|
"method": "PUT",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"name\": \"iPad\",\n \"room\": \"61e052628547289a0528f160\",\n \"price\": 102,\n \"purchaseDate\": \"2014\",\n \"link\": \"\",\n \"categories\": []\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/item/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"item",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "61e052738547289a0528f164"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Delete item",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/item/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"item",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "61e0562e61e5da067d9bec77"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Delete invoice",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "formdata",
|
|
"formdata": [
|
|
{
|
|
"key": "invoice",
|
|
"type": "file",
|
|
"src": "/Users/lucasstbnr/Downloads/iPad Air Maman.pdf"
|
|
}
|
|
]
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/item/:_id/invoice",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"item",
|
|
":_id",
|
|
"invoice"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "61e07007cf65426aa42c8ba2"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "File",
|
|
"item": [
|
|
{
|
|
"name": "Get file",
|
|
"protocolProfileBehavior": {
|
|
"disableBodyPruning": true
|
|
},
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "formdata",
|
|
"formdata": [
|
|
{
|
|
"key": "file",
|
|
"type": "file",
|
|
"src": "/Users/lucasstbnr/Downloads/iPad Air Maman.pdf",
|
|
"disabled": true
|
|
}
|
|
]
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/file/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"file",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "6204cbafaaa6e3e51447de8d"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Upload file",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "formdata",
|
|
"formdata": [
|
|
{
|
|
"key": "file",
|
|
"type": "file",
|
|
"src": "/Users/lucasstbnr/Downloads/velo-gravel-triban-grvl-120.jpg"
|
|
},
|
|
{
|
|
"key": "item",
|
|
"value": "61e07007cf65426aa42c8ba2",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "type",
|
|
"value": "invoice",
|
|
"type": "text"
|
|
}
|
|
]
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/file",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"file"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Set invoice for item",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"invoice\": {\n \"_id\": \"\",\n \"filename\": \"\"\n }\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/file/:_id/invoice",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"file",
|
|
":_id",
|
|
"invoice"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "61f051e46b13c87afe12cf83"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Delete file",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "formdata",
|
|
"formdata": [
|
|
{
|
|
"key": "file",
|
|
"type": "file",
|
|
"src": "/Users/lucasstbnr/Downloads/iPad Air Maman.pdf",
|
|
"disabled": true
|
|
}
|
|
]
|
|
},
|
|
"url": {
|
|
"raw": "{{url}}/file/:_id",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"file",
|
|
":_id"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "61eef98ea648c4c8e72f205d"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Delete invoice from item",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/file/:_id/invoice",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"file",
|
|
":_id",
|
|
"invoice"
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "_id",
|
|
"value": "61f051e46b13c87afe12cf83"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Status",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}",
|
|
"host": [
|
|
"{{url}}"
|
|
]
|
|
}
|
|
},
|
|
"response": [
|
|
{
|
|
"name": "Success",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}",
|
|
"host": [
|
|
"{{url}}"
|
|
]
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "json",
|
|
"header": [
|
|
{
|
|
"key": "X-Powered-By",
|
|
"value": "Express"
|
|
},
|
|
{
|
|
"key": "Vary",
|
|
"value": "Origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Credentials",
|
|
"value": "true"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
},
|
|
{
|
|
"key": "Content-Length",
|
|
"value": "16"
|
|
},
|
|
{
|
|
"key": "ETag",
|
|
"value": "W/\"10-oV4hJxRVSENxc/wX8+mA4/Pe4tA\""
|
|
},
|
|
{
|
|
"key": "Date",
|
|
"value": "Thu, 29 Sep 2022 18:38:19 GMT"
|
|
},
|
|
{
|
|
"key": "Connection",
|
|
"value": "keep-alive"
|
|
},
|
|
{
|
|
"key": "Keep-Alive",
|
|
"value": "timeout=5"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{\n \"success\": true\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Get Categories",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{url}}/category",
|
|
"host": [
|
|
"{{url}}"
|
|
],
|
|
"path": [
|
|
"category"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
],
|
|
"event": [
|
|
{
|
|
"listen": "prerequest",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
""
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
""
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "url",
|
|
"value": "https://but-3-dev-project-back.onrender.com/api",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "username",
|
|
"value": "xxxxx",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "password",
|
|
"value": "xxxxx",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "_id",
|
|
"value": "",
|
|
"type": "string"
|
|
}
|
|
]
|
|
} |