-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from RyaWcksn/DEV-0001
Dev 0001
- Loading branch information
Showing
9 changed files
with
529 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,221 @@ | ||
{ | ||
"info": { | ||
"_postman_id": "88ed0e03-4670-49a1-8ddf-94998901a31b", | ||
"name": "Ecommerce", | ||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | ||
}, | ||
"item": [ | ||
{ | ||
"name": "Login", | ||
"request": { | ||
"method": "POST", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n \"email\": \"[email protected]\",\n \"password\": \"password123\",\n \"role\": \"buyer\"\n}" | ||
}, | ||
"url": { | ||
"raw": "http://localhost:9000/api/v1/login", | ||
"protocol": "http", | ||
"host": [ | ||
"localhost" | ||
], | ||
"port": "9000", | ||
"path": [ | ||
"api", | ||
"v1", | ||
"login" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Create Product", | ||
"request": { | ||
"auth": { | ||
"type": "bearer", | ||
"bearer": [ | ||
{ | ||
"key": "token", | ||
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJlbWFpbCI6InVzZXJAbWFpbC5jb20iLCJleHAiOjE2ODA4NDA5MzgsImlkIjoxLCJyb2xlIjoiYnV5ZXIifQ.nCANSscjLFy3zUDkXoeuU-82nujolaoyi_BSkH5IN64", | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"method": "POST", | ||
"header": [ | ||
{ | ||
"key": "Authorization", | ||
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJlbWFpbCI6InVzZXJAbWFpbC5jb20iLCJleHAiOiIxNjgwNzk2NTgyIiwiaWQiOiIxIiwicm9sZSI6InNlbGxlciJ9.64y5erHm71BfYLJXxXxUZy0J6vm3FufLO0rw54Pk7Wg", | ||
"type": "default", | ||
"disabled": true | ||
} | ||
], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n \"name\": \"HG Dynames Gundam\",\n \"description\": \"HG Dynames Gundam from Kidou Senshi Gundam 00\",\n \"price\": \"18000\"\n}" | ||
}, | ||
"url": { | ||
"raw": "http://localhost:9000/api/v1/seller/create", | ||
"protocol": "http", | ||
"host": [ | ||
"localhost" | ||
], | ||
"port": "9000", | ||
"path": [ | ||
"api", | ||
"v1", | ||
"seller", | ||
"create" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Get Seller products", | ||
"request": { | ||
"method": "GET", | ||
"header": [], | ||
"url": { | ||
"raw": "http://localhost:9000/api/v1/seller/products", | ||
"protocol": "http", | ||
"host": [ | ||
"localhost" | ||
], | ||
"port": "9000", | ||
"path": [ | ||
"api", | ||
"v1", | ||
"seller", | ||
"products" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Create Order", | ||
"request": { | ||
"method": "POST", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n \"productId\": [1],\n \"sellerId\": 1\n}" | ||
}, | ||
"url": { | ||
"raw": "http://localhost:9000/api/v1/order", | ||
"protocol": "http", | ||
"host": [ | ||
"localhost" | ||
], | ||
"port": "9000", | ||
"path": [ | ||
"api", | ||
"v1", | ||
"order" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Get all seller orders", | ||
"request": { | ||
"method": "GET", | ||
"header": [], | ||
"url": { | ||
"raw": "http://localhost:9000/api/v1/seller/order", | ||
"protocol": "http", | ||
"host": [ | ||
"localhost" | ||
], | ||
"port": "9000", | ||
"path": [ | ||
"api", | ||
"v1", | ||
"seller", | ||
"order" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Accept Order", | ||
"request": { | ||
"method": "PATCH", | ||
"header": [], | ||
"url": { | ||
"raw": "http://localhost:9000/api/v1/seller/order/accept", | ||
"protocol": "http", | ||
"host": [ | ||
"localhost" | ||
], | ||
"port": "9000", | ||
"path": [ | ||
"api", | ||
"v1", | ||
"seller", | ||
"order", | ||
"accept" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Buyer list orders", | ||
"request": { | ||
"method": "GET", | ||
"header": [], | ||
"url": { | ||
"raw": "http://localhost:9000/api/v1/orders", | ||
"protocol": "http", | ||
"host": [ | ||
"localhost" | ||
], | ||
"port": "9000", | ||
"path": [ | ||
"api", | ||
"v1", | ||
"orders" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Get Products", | ||
"request": { | ||
"auth": { | ||
"type": "bearer", | ||
"bearer": [ | ||
{ | ||
"key": "token", | ||
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJlbWFpbCI6InVzZXJAbWFpbC5jb20iLCJleHAiOjE2ODA5MjYyMzUsImlkIjoxLCJyb2xlIjoiYnV5ZXIifQ.0tXezwqgzCcU073i7e0xo5_02Lte65Z7kPMxtkjGvEM", | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"method": "GET", | ||
"header": [], | ||
"url": { | ||
"raw": "http://localhost:9000/api/v1/products", | ||
"protocol": "http", | ||
"host": [ | ||
"localhost" | ||
], | ||
"port": "9000", | ||
"path": [ | ||
"api", | ||
"v1", | ||
"products" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ Ecommerce for seller and buyer | |
**Table of Contents** | ||
|
||
- [ecommerce](#ecommerce) | ||
- [How to install](#how-to-install) | ||
- [Common Errors](#common-errors) | ||
- [Endpoints](#endpoints) | ||
- [Requests and Response](#requests-and-response) | ||
|
@@ -25,6 +26,24 @@ Ecommerce for seller and buyer | |
|
||
<!-- markdown-toc end --> | ||
|
||
## How to install | ||
|
||
```bash | ||
git clone https://github.com/RyaWcksn/ecommerce | ||
cd ecommerce | ||
docker-compose --build -d | ||
|
||
./migrate.sh | ||
``` | ||
|
||
- Buyer account | ||
> [email protected] | ||
> password123 | ||
- Seller account | ||
> [email protected] | ||
> password123 | ||
|
||
## Common Errors | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.