Skip to content

Conversation

@jkrizsan
Copy link
Collaborator

Brief description

Add a endpoint to add coins to the clan

Change list

  • add shop module
  • add clanCoins endpoint
  • fix the failed tests
  • add shop test module and tests for the shop module

@jkrizsan jkrizsan added feature New feature to add PR Pull request labels May 15, 2025
@jkrizsan jkrizsan assigned MikhailDeriabin and unassigned jkrizsan May 15, 2025
@MikhailDeriabin MikhailDeriabin changed the title Feature/add a endpoint to add coins to the clan 550 Added an endpoint to add coins to the clan May 16, 2025
@MikhailDeriabin MikhailDeriabin moved this from Backlog to In progress in Altzone-Server May 16, 2025
@MikhailDeriabin MikhailDeriabin linked an issue May 16, 2025 that may be closed by this pull request
@MikhailDeriabin MikhailDeriabin enabled auto-merge May 16, 2025 10:06
@IsEnum(Language)
@IsOptional()
language?: Language;

Copy link
Collaborator

Choose a reason for hiding this comment

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

This field can not be here, because that means that the gameCoins can be updated straight from the /clan PUT endpoint.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Indeed, that's the job of the /clan PUT endpoint to update the clan properties :)
Anyway, I dropped the extra feature...

Copy link
Member

@PlayJeri PlayJeri left a comment

Choose a reason for hiding this comment

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

I think the DTOs shouldn't ask for information that gets overwritten. So consider removing the clan id from dto and use different params for the service method. And in the service method it is unnecessary to read the clan from db. You can directly increment the coins using the $inc operator.

Copy link
Member

@PlayJeri PlayJeri left a comment

Choose a reason for hiding this comment

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

Nice work! 👍

@MikhailDeriabin MikhailDeriabin merged commit 17abd84 into dev May 23, 2025
@MikhailDeriabin MikhailDeriabin deleted the feature/add-a-endpoint-to-add-coins-to-the-clan-550 branch May 23, 2025 07:57
@github-project-automation github-project-automation bot moved this from In progress to Done in Altzone-Server May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature to add PR Pull request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Feature request: Add a endpoint to add coins to the clan

4 participants