Skip to content

Commit

Permalink
feat(com-api): seprate http file for add product
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm committed Feb 11, 2023
1 parent 487a2c0 commit fd9bb5e
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 11 deletions.
90 changes: 90 additions & 0 deletions uniquely/com-api/add-product.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
@apiUrl = http://127.0.0.1:8000/api/v0
@adminToken = ADMIN_SECRET_TOKEN

### New product 1
PUT {{apiUrl}}/product/
Authorization: Bearer {{adminToken}}
Content-Type: application/json

{
"id": "1",
"title": {"fa": "تایل کد ۰۰۱"},
"image": "/image/sample-1.jpg"
}

### New product 2
PUT {{apiUrl}}/product/
Authorization: Bearer {{adminToken}}
Content-Type: application/json

{
"id": "2",
"title": {"fa": "تایل کد ۰۰۲"},
"image": "/image/sample-2.jpg"
}

### New product 3
PUT {{apiUrl}}/product/
Authorization: Bearer {{adminToken}}
Content-Type: application/json

{
"id": "3",
"title": {"fa": "تایل کد ۰۰۳"},
"image": "/image/sample-3.jpg"
}

### New product 4
PUT {{apiUrl}}/product/
Authorization: Bearer {{adminToken}}
Content-Type: application/json

{
"id": "4",
"title": {"fa": "تایل کد ۰۰۴"},
"image": "/image/sample-4.jpg"
}

### New product 5
PUT {{apiUrl}}/product/
Authorization: Bearer {{adminToken}}
Content-Type: application/json

{
"id": "5",
"title": {"fa": "تایل کد ۰۰۵"},
"image": "/image/sample-1.jpg"
}

### New product 6
PUT {{apiUrl}}/product/
Authorization: Bearer {{adminToken}}
Content-Type: application/json

{
"id": "6",
"title": {"fa": "تایل کد ۰۰۶"},
"image": "/image/sample-2.jpg"
}

### New product 7
PUT {{apiUrl}}/product/
Authorization: Bearer {{adminToken}}
Content-Type: application/json

{
"id": "7",
"title": {"fa": "تایل کد ۰۰۷"},
"image": "/image/sample-3.jpg"
}

### New product 8
PUT {{apiUrl}}/product/
Authorization: Bearer {{adminToken}}
Content-Type: application/json

{
"id": "8",
"title": {"fa": "تایل کد ۰۰۸"},
"image": "/image/sample-3.jpg"
}
11 changes: 0 additions & 11 deletions uniquely/com-api/demo.http
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@ GET {{apiUrl}}/
GET {{apiUrl}}/product/
Authorization: Bearer {{token}}

### New product
PUT {{apiUrl}}/product/
Authorization: Bearer {{adminToken}}
Content-Type: application/json

{
"id": "1",
"title": {"fa": "تایل کد ۰۰۱"},
"image": "/image/sample-1.jpg"
}

### New order of user
PUT {{apiUrl}}/order/?userId=abc123
Authorization: Bearer {{token}}
Expand Down

0 comments on commit fd9bb5e

Please sign in to comment.