Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/pokemon player #150

Merged
merged 11 commits into from
Oct 13, 2023
Merged

Feat/pokemon player #150

merged 11 commits into from
Oct 13, 2023

Conversation

CybR37
Copy link
Contributor

@CybR37 CybR37 commented Oct 11, 2023

PR name

Feature: let pokemon players add their play! playerId into database

Changes

Add new column in teams db table
Rework /teams POST endpoint to allow new parameter (optional parameter)
-> A string with regex [0-9]+

Breaking changes

What's left to do (DELTE THIS PART FOR NON-DRAFT PRs)

  • Verify build
  • Lint
  • Remove console.log / commented code
    Merge the front pull request after this one

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (b7afc61) 96.50% compared to head (6cc74f3) 96.51%.

❗ Current head 6cc74f3 differs from pull request most recent head 9457d87. Consider uploading reports for the commit 9457d87 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #150   +/-   ##
=======================================
  Coverage   96.50%   96.51%           
=======================================
  Files         108      108           
  Lines        2292     2294    +2     
  Branches      330      331    +1     
=======================================
+ Hits         2212     2214    +2     
  Misses         44       44           
  Partials       36       36           
Files Coverage Δ
src/controllers/teams/createTeam.ts 100.00% <100.00%> (ø)
src/operations/team.ts 98.91% <ø> (ø)
src/types.ts 100.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@TeddyRoncin TeddyRoncin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice trop bien !

Il manque encore les tests :)

Faudrait aussi retourner le pokémonId au front (je pense aux routes GET /user/current et GET /admin/users)

Et dernier truc auquel je pense : il faudrait check au moment de la création de l'équipe si c'est une équipe du tournoi pokémon, et si oui, faire en sorte que le champ soit obligatoire (renvoyer une erreur s'il n'est pas présent, t'embête pas à utiliser les middlewares)

Teddy Roncin and others added 4 commits October 12, 2023 21:37
* changed field pokemonPlayerId in table Tournament to String
* return error on team creation if the pokemonPlayerId is not
specified but the tournament is the pokemon tournament
src/controllers/teams/openapi.yml Outdated Show resolved Hide resolved
@TeddyRoncin TeddyRoncin merged commit fb77760 into dev Oct 13, 2023
5 checks passed
@TeddyRoncin TeddyRoncin deleted the feat/pokemon-player-id branch October 13, 2023 17:28
DevNono added a commit that referenced this pull request Sep 10, 2024
* feat: add pokemonplayerid in teams table -> db

* fix: change Int type to String in Db

* feat: add pokemonPlayerId to POST /teams endpoint parameters

* feat: add pokemonplayerid in teams table -> db

* fix: fix linter advices

* fix: bugs

* changed field pokemonPlayerId in table Tournament to String
* return error on team creation if the pokemonPlayerId is not
specified but the tournament is the pokemon tournament

* feat: add test and fix issues on Prisma

* docs: add some docs

* fix: lint

* fix: typo

---------

Co-authored-by: Teddy Roncin <[email protected]>
Co-authored-by: Noé Landré <[email protected]>
Co-authored-by: Noé Landré <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants