Skip to content

Commit

Permalink
Merge pull request #179 from ungdev/dev
Browse files Browse the repository at this point in the history
small change in tournament and partners positions
  • Loading branch information
TeddyRoncin authored Oct 23, 2023
2 parents e728c3b + d258668 commit a6dd213
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 11 deletions.
6 changes: 0 additions & 6 deletions src/controllers/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ components:
placesLeft:
type: integer
example: 5
position:
type: integer

UserRestricted:
type: object
Expand Down Expand Up @@ -758,8 +756,6 @@ components:
discordVocalCategoryId:
type: string
nullable: true
position:
type: integer
teams:
type: array
items:
Expand All @@ -776,8 +772,6 @@ components:
type: string
display:
type: boolean
position:
type: integer

responses:
400Errored:
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/partners/getPartners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default [
result = result.filter((partner) => partner.display);

// Don't pick the display field
const partners = result.map((partner) => pick(partner, ['id', 'name', 'link', 'position']));
const partners = result.map((partner) => pick(partner, ['id', 'name', 'link']));

return success(response, partners);
} catch (error) {
Expand Down
1 change: 0 additions & 1 deletion src/utils/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ export const filterTournamentRestricted = (tournament: Tournament) => {
'cashprizeDetails',
'format',
'infos',
'position',
);

return {
Expand Down
2 changes: 1 addition & 1 deletion tests/partners/getPartners.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('GET /partners', () => {
expect(response.body).to.have.lengthOf(partners.length - 1);
// Not to have tournaments[0] because it has display false
expect(response.body).not.to.have.deep.members([partners[0]]);
expect(response.body[0]).to.have.all.keys(['id', 'name', 'link', 'position']);
expect(response.body[0]).to.have.all.keys(['id', 'name', 'link']);
expect(response.body[0].name).to.be.a('string');
expect(response.body[0].link).to.be.a('string');
});
Expand Down
2 changes: 0 additions & 2 deletions tests/tournaments/getTournaments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ describe('GET /tournaments', () => {
'infos',
'format',
'cashprizeDetails',
'position',
]);
expect(response.body[0].lockedTeamsCount).to.be.a('number');
expect(response.body[0].cashprize).to.be.a('number');
Expand Down Expand Up @@ -114,7 +113,6 @@ describe('GET /tournaments', () => {
'infos',
'format',
'cashprizeDetails',
'position',
]);
expect(response.body[1].lockedTeamsCount).to.be.a('number');
expect(response.body[0].cashprize).to.be.null;
Expand Down

0 comments on commit a6dd213

Please sign in to comment.