-
Notifications
You must be signed in to change notification settings - Fork 1
Added an endpoint to add coins to the clan #555
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
Added an endpoint to add coins to the clan #555
Conversation
…rop unnecessary dependencies from the shop module.
…e. Fix failed tests.
src/clan/dto/updateClan.dto.ts
Outdated
| @IsEnum(Language) | ||
| @IsOptional() | ||
| language?: Language; | ||
|
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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...
PlayJeri
left a comment
There was a problem hiding this 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.
PlayJeri
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! 👍
Brief description
Add a endpoint to add coins to the clan
Change list