Skip to content

Commit

Permalink
Add isPremium field to UpdateUserDto, UsersController, and UsersService
Browse files Browse the repository at this point in the history
  • Loading branch information
songloimr committed May 3, 2024
1 parent 2c8fda5 commit 0ec96ab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
5 changes: 1 addition & 4 deletions src/modules/invoices/invoices.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ export class InvoicesService {
}
const username = split[1];
const user: UserDocument = await this.userModel.findOneAndUpdate({ username }, {
isPremium: true,
name: {
$concat: ["$name", "👑"]
}
isPremium: true
}).exec();

await this.invoiceModel.create({
Expand Down
3 changes: 0 additions & 3 deletions src/modules/users/users.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ export class UsersService {
becomeVip(sub: any) {
return this.userModel.findByIdAndUpdate(sub, {
isPremium: true,
name: {
$concat: ["$name", "👑"]
}
}, {
new: true
}).select({
Expand Down

0 comments on commit 0ec96ab

Please sign in to comment.