Skip to content

Commit

Permalink
update api
Browse files Browse the repository at this point in the history
  • Loading branch information
augustus281 committed Mar 31, 2024
1 parent 44e9f45 commit 5f85f14
Showing 1 changed file with 119 additions and 6 deletions.
125 changes: 119 additions & 6 deletions server/src/postman/BKTravel.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"firstname\": \"Huy\",\r\n \"lastname\": \"Nguyen\",\r\n \"email\": \"theflash28012002@gmail.com\",\r\n \"password\": \"123456789\",\r\n \"confirm_password\": \"123456789\"\r\n}",
"raw": "{\r\n \"firstname\": \"Huy\",\r\n \"lastname\": \"Nguyen\",\r\n \"email\": \"huy2801@gmail.com\",\r\n \"password\": \"123456789\",\r\n \"confirm_password\": \"123456789\"\r\n}",
"options": {
"raw": {
"language": "json"
Expand Down Expand Up @@ -44,7 +44,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"email\": \"[email protected]\",\r\n \"password\": \"123456\"\r\n}",
"raw": "{\r\n \"email\": \"[email protected]\",\r\n \"password\": \"123456789\"\r\n}",
"options": {
"raw": {
"language": "json"
Expand Down Expand Up @@ -958,6 +958,119 @@
},
"response": []
},
{
"name": "Create order by tour id",
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJlbWFpbCI6Imh1eS5uZ3V5ZW4yODAxMjAwMkBoY211dC5lZHUudm4iLCJyb2xlX3VzZXIiOiJjdXN0b21lciIsImlhdCI6MTcwNTg1OTEwMSwiZXhwIjoxNzA1ODYwOTAxfQ.CVQhYHm4g_-xFLV-rIezkRoyzOPogEkxm5nzrX6S930",
"type": "text",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"user_id\": 1,\r\n \"child_quantity\": 2,\r\n \"adult_quantity\": 3,\r\n \"tour_id\": 1,\r\n \"name_customer\": \"Nguyen Duc Huy\",\r\n \"phone_customer\": \"0979957328\",\r\n \"address_customer\": \"Ho Chi Minh City\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:8080/api/v1/order",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"api",
"v1",
"order"
]
}
},
"response": []
},
{
"name": "Apply voucher to order",
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJlbWFpbCI6Imh1eS5uZ3V5ZW4yODAxMjAwMkBoY211dC5lZHUudm4iLCJyb2xlX3VzZXIiOiJjdXN0b21lciIsImlhdCI6MTcwNTg1OTEwMSwiZXhwIjoxNzA1ODYwOTAxfQ.CVQhYHm4g_-xFLV-rIezkRoyzOPogEkxm5nzrX6S930",
"type": "text",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"user_id\": 1,\r\n \"listVoucherCodes\": [\"ABZ\", \"ABC123\"]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:8080/api/v1/order/1/applyVoucher",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"api",
"v1",
"order",
"1",
"applyVoucher"
]
}
},
"response": []
},
{
"name": "Get Comment by parent_comment_id",
"request": {
"method": "DELETE",
"header": [
{
"key": "Authorization",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJlbWFpbCI6Imh1eS5uZ3V5ZW4yODAxMjAwMkBoY211dC5lZHUudm4iLCJyb2xlX3VzZXIiOiJjdXN0b21lciIsImlhdCI6MTcwNTg1OTEwMSwiZXhwIjoxNzA1ODYwOTAxfQ.CVQhYHm4g_-xFLV-rIezkRoyzOPogEkxm5nzrX6S930",
"type": "text",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"tour_id\": 1,\r\n \"parent_comment_id\": 37\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:8080/api/v1/comment",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"api",
"v1",
"comment"
]
}
},
"response": []
},
{
"name": "Create voucher",
"request": {
Expand All @@ -968,22 +1081,22 @@
"formdata": [
{
"key": "description",
"value": "Voucher giảm giá 3%",
"value": "Giảm giá 100K",
"type": "text"
},
{
"key": "code_voucher",
"value": "ABC123",
"value": "ABZ",
"type": "text"
},
{
"key": "type",
"value": "percentage",
"value": "fixed",
"type": "text"
},
{
"key": "value_discount",
"value": "0.03",
"value": "100000",
"type": "text"
},
{
Expand Down

0 comments on commit 5f85f14

Please sign in to comment.