Skip to content

Commit

Permalink
feat: add the possibility to update the user badge
Browse files Browse the repository at this point in the history
  • Loading branch information
freitagfelipe committed Dec 3, 2023
1 parent 1675638 commit 4b21364
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/user/dto/update-user.dto.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ApiProperty } from "@nestjs/swagger";
import { Badge } from "src/badge/entities/badge.entity";
import { Expertise } from "src/expertise/entities/expertise.entity";

export class UpdateUserDto {
Expand All @@ -15,4 +16,7 @@ export class UpdateUserDto {
type: [String],
})
expertises: Expertise[];

@ApiProperty()
badge: Badge;
}
2 changes: 1 addition & 1 deletion src/user/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export class UserService {
email: updateUserDto.email,
hashPassword: user.hashPassword,
xp: user.xp,
currentBadge: user.currentBadge,
currentBadge: updateUserDto.badge,
expertises: updateUserDto.expertises
};

Expand Down

0 comments on commit 4b21364

Please sign in to comment.