Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Delivery of 4.2 #2

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .env-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASS=1234
DB_NAME=machado_dices

API_PORT=5000

ACCESS_TOKEN_SECRET=8472ab76016b0881aeab256c9e3c4c6c321fc757f506736d99054e626e98cb3b224897187a30e5d4abbe98c249c8da8aa7badfe98dd099a93fd510fa8b84cf91
REFRESH_TOKEN_SECRET=2f92cf56fdc55fb33f8e4b423ede9bb1d4f38a5cbc5c27603edf061f71957efaf0181262618b62ded74563a75fb15b2bdb339e607e62105c3d65d558fb0c7337
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/node_modules
.env
380 changes: 380 additions & 0 deletions POSTMAN_COLLECTION/Postman 4.2.postman_collection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,380 @@
{
"info": {
"_postman_id": "7b1ec78d-12fa-4cbd-8edc-2573882fffae",
"name": "Postman 4.2",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "GAMES",
"item": [
{
"name": "get games by player id",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:5000/games/1",
"protocol": "http",
"host": [
"localhost"
],
"port": "5000",
"path": [
"games",
"1"
]
}
},
"response": []
},
{
"name": "run games by player id",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "http://localhost:5000/games/1",
"protocol": "http",
"host": [
"localhost"
],
"port": "5000",
"path": [
"games",
"1"
]
}
},
"response": []
},
{
"name": "Delete games by player id and jwt",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "http://localhost:5000/games/1",
"protocol": "http",
"host": [
"localhost"
],
"port": "5000",
"path": [
"games",
"1"
]
}
},
"response": []
}
]
},
{
"name": "PLAYER",
"item": [
{
"name": "getPlayers",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:5000/players",
"protocol": "http",
"host": [
"localhost"
],
"port": "5000",
"path": [
"players"
]
}
},
"response": []
},
{
"name": "addPlayer Victor",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"username\": \"Victor\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:5000/players",
"protocol": "http",
"host": [
"localhost"
],
"port": "5000",
"path": [
"players"
]
}
},
"response": []
},
{
"name": "addPlayer Paula",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"username\": \"Paula\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:5000/players",
"protocol": "http",
"host": [
"localhost"
],
"port": "5000",
"path": [
"players"
]
}
},
"response": []
},
{
"name": "addPlayer Omar",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"username\": \"Omar\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:5000/players",
"protocol": "http",
"host": [
"localhost"
],
"port": "5000",
"path": [
"players"
]
}
},
"response": []
},
{
"name": "add anonim",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "POST http://localhost:5000/players",
"protocol": "POST http",
"host": [
"localhost"
],
"port": "5000",
"path": [
"players"
]
}
},
"response": []
},
{
"name": "updatePlayer Victor",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"username\": \"merche\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:5000/players/1",
"protocol": "http",
"host": [
"localhost"
],
"port": "5000",
"path": [
"players",
"1"
]
}
},
"response": []
},
{
"name": "deletePlayer with jwt",
"request": {
"auth": {
"type": "bearer"
},
"method": "DELETE",
"header": [],
"url": {
"raw": "http://localhost:5000/players/1",
"protocol": "http",
"host": [
"localhost"
],
"port": "5000",
"path": [
"players",
"1"
]
}
},
"response": []
}
]
},
{
"name": "RANKING",
"item": [
{
"name": "get ranking",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:5000/ranking",
"protocol": "http",
"host": [
"localhost"
],
"port": "5000",
"path": [
"ranking"
]
}
},
"response": []
},
{
"name": "get winner",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:5000/ranking/winner",
"protocol": "http",
"host": [
"localhost"
],
"port": "5000",
"path": [
"ranking",
"winner"
]
}
},
"response": []
},
{
"name": "get loser",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:5000/ranking/loser",
"protocol": "http",
"host": [
"localhost"
],
"port": "5000",
"path": [
"ranking",
"loser"
]
}
},
"response": []
}
]
},
{
"name": "LOGIN",
"item": [
{
"name": "registerAdmin",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"username\": \"victor\",\r\n \"password\": \"123456\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:5000/login/register",
"protocol": "http",
"host": [
"localhost"
],
"port": "5000",
"path": [
"login",
"register"
]
}
},
"response": []
},
{
"name": "get JWT token",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"username\": \"victor\",\r\n \"password\": \"123456\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:5000/login/",
"protocol": "http",
"host": [
"localhost"
],
"port": "5000",
"path": [
"login",
""
]
}
},
"response": []
}
]
}
]
}
Loading