/poc2-games-prisma

Primary LanguageTypeScriptMozilla Public License 2.0MPL-2.0

poc2-games-prisma

Rotas:

POST: /genres
Body: { "genre": "Terror" }

GET: /genres
Response: [{ "id": 1, "genre": "Aventura" }, { "id": 2, "genre": "Ação" }]

POST: /games
Body: { "name_game": "Stardew Valley", "review": 10, "genre_id": 1}

GET: /games
Response: [{ "id": 1, "name_game": "Stardew Valley", "review": 10, "genre": "Aventura" }, { "id": 2, "name_game": "Valorant", "review": 8, "genre": "Jogo de tiro tático" }]

PATCH: /games/:id
Body: {"review": 10}

DELETE: /games/:id