Skip to content

Commit

Permalink
Merge branch 'main' into img
Browse files Browse the repository at this point in the history
  • Loading branch information
vitcbrl authored Aug 21, 2023
2 parents cf77d66 + f0f0420 commit fdb0ad6
Show file tree
Hide file tree
Showing 8 changed files with 3,679 additions and 3,650 deletions.
24 changes: 12 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
coverage/
node_modules/
.DS_Store
*.log

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
coverage/
node_modules/
.DS_Store
*.log

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,38 @@
# Burger Queen API Mock
Usando las librerías [json-server](https://github.com/typicode/json-server)
y [json-server-auth](https://github.com/jeremyben/json-server-auth)
se crea un mock para
[Burger Queen API](https://app.swaggerhub.com/apis/ssinuco/BurgerQueenAPI/2.0.0)

## Ejecución
1. Clona el repositorio lalala
2. Instala las dependencias
```bash
npm install
```
3. Ejecuta el mock
```bash
npm start
```
4. Ahora puedes acceder a los endpoints del API descritos en la
[documentación](https://app.swaggerhub.com/apis/ssinuco/BurgerQueenAPI/2.0.0)
usando como URL base [http://localhost:8080/](http://localhost:8080/).

Tal como indica la documentación, los endpoints están protegidos
por token de autenticación.

En el archivo [requests.http](./requests.http) encuentras
algunas peticiones de prueba que puedes ejecutar directamente
en VSCode usando la extensión
[REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client).

## Información

El mock _out-of-the-box_ provee información de 2 usuarias administradoras [email protected]_ y [email protected]_. La contraseña de ambos usuarios es _123456_

También provee información de 2 órdenes y 2 productos.
=======
# Burger Queen API Mock

Usando las librerías [json-server](https://github.com/typicode/json-server)
y [json-server-auth](https://github.com/jeremyben/json-server-auth)
Expand All @@ -7,7 +41,7 @@ se crea un mock para

## Ejecución

1. Clona el repositorio lalala
1. Clona el repositorio
2. Instala las dependencias
```bash
npm install
Expand Down
83 changes: 39 additions & 44 deletions db.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,66 @@
"orders": [
{
"id": 1,
"userId": 1,
"client": "Jude Milhon",
"userId": "1",
"client": "Mislene",
"products": [
{
"qty": 1,
"product": {
"id": 1,
"name": "Sandwich de jamón y queso",
"price": 1000,
"image": "https://github.com/Laboratoria/bootcamp/tree/main/projects/04-burger-queen-api/resources/images/sandwich.jpg",
"type": "Desayuno",
"dateEntry": "2022-03-05 15:14:10"
}
},
{
"qty": 1,
"product": {
"id": 2,
"name": "Café americano",
"price": 500,
"image": "https://github.com/Laboratoria/bootcamp/tree/main/projects/04-burger-queen-api/resources/images/coffe.jpg",
"type": "Desayuno",
"dateEntry": "2022-03-05 15:14:10"
"id": "1",
"name": "Anéis de cebola",
"price": "5",
"image": "https://imgbox.com/bF8IBK4m",
"type": "Almoço",
"dataEntry": "2023-08-16 20:28:10"
}
}
],
"status": "pending",
"dataEntry": "2022-03-05 15:00"
"dateEntry": "2023-08-16 20:28:10",
"dateProcessed": "2023-08-17 16:00"
},
{
"id": 2,
"userId": 2,
"client": "Katie Bouman",
"userId": "2",
"client": "Vitória",
"products": [
{
"qty": 2,
"product": {
"id": 2,
"name": "Café americano",
"price": 500,
"image": "https://github.com/Laboratoria/bootcamp/tree/main/projects/04-burger-queen-api/resources/images/coffe.jpg",
"type": "Desayuno",
"dateEntry": "2022-03-05 15:14:10"
"id": "6",
"name": "Hambúrguer duplo",
"price": "15",
"image": "https://imgbox.com/6gp2IPLd",
"type": "Almoço",
"dataEntry": "2023-08-16 20:28:10"
}
},
}
],
"status": "pending",
"dateEntry": "2023-08-16 20:28:10",
"dateProcessed": "2023-08-17 16:00"
},
{
"id": 3,
"userId": "3",
"client": "Mo",
"products": [
{
"qty": 1,
"qty": 3,
"product": {
"id": 3,
"name": "Agua 500ml",
"price": 500,
"image": "https://github.com/Laboratoria/bootcamp/tree/main/projects/04-burger-queen-api/resources/images/water.jpg",
"type": "Almuerzo",
"dateEntry": "2022-03-05 15:14:10"
"id": "1",
"name": "Café Americano",
"price": "5",
"image": "https://imgbox.com/DCERopVE",
"type": "Café da manha",
"dataEntry": "2023-08-16 20:28:10"
}
}
],
"status": "delivered",
"dataEntry": "2022-03-05 15:00",
"dateProcessed": "2022-03-05 16:00"
"status": "pending",
"dateEntry": "2023-08-16 20:28:10",
"dateProcessed": "2023-08-17 16:00"
}
],
"products": [
Expand Down Expand Up @@ -178,13 +178,8 @@
"id": 2
},
{
<<<<<<< Updated upstream
"email": "[email protected]",
"password": "$2a$10$/xHIoXvgEBpG4KSMgBuhN.tS5WnoMDolpg.y2xj77wvSGQv6kUvNu",
=======
"email": "[email protected]",
"password": "$2a$10$DOzn3gE9JqbE.iDSpq/LAuBztyObXiZxx2c9mu/o7fRQTbjwdrOze",
>>>>>>> Stashed changes
"role": "admin",
"id": 3
}
Expand Down
Loading

0 comments on commit fdb0ad6

Please sign in to comment.