Skip to content

Commit

Permalink
Merge pull request #108 from depromeet/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ImNM authored Jun 29, 2022
2 parents ac16ef1 + 42f0265 commit 7d03b17
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/apis/users/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ export class UserController {
description: '요청 성공시',
type: FlagInfoDto,
})
updateUserFlagInfo(@ReqUser() user: User, @Body() flagInfoDto: FlagInfoDto) {
return this.userService.updateUserFlagInfo(user.userIdDto, flagInfoDto);
updateUserFlagInfo(@ReqUser() user: User) {
return this.userService.updateUserFlagInfo(user.userIdDto);
}

@ApiOperation({
Expand Down
8 changes: 1 addition & 7 deletions src/apis/users/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,15 +312,10 @@ export class UserService {
}

@returnValueToDto(FlagInfoDto)
async updateUserFlagInfo(
myUserIdDto: UserIdDto,
flagInfoDto: FlagInfoDto,
): Promise<FlagInfoDto> {
async updateUserFlagInfo(myUserIdDto: UserIdDto): Promise<FlagInfoDto> {
const updatedUserFlagInfo = await this.userRepository.updateUserFlagInfo(
myUserIdDto,
flagInfoDto,
);
console.log('asdfasdfasdfafsdF', updatedUserFlagInfo);

return { flagInfo: updatedUserFlagInfo };
}
Expand All @@ -330,7 +325,6 @@ export class UserService {
const getUserFlagInfo = await this.userRepository.getUserFlagInfo(
myUserIdDto,
);
console.log('asdfasdfasdfafsdF', getUserFlagInfo);

return { flagInfo: getUserFlagInfo };
}
Expand Down
5 changes: 1 addition & 4 deletions src/repositories/user.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,7 @@ export class UserRepository {
return user.FCMToken;
}

async updateUserFlagInfo(
myUserIdDto: UserIdDto,
flagInfoDto: FlagInfoDto,
): Promise<boolean> {
async updateUserFlagInfo(myUserIdDto: UserIdDto): Promise<boolean> {
const user = await this.userModel
.findOneAndUpdate(
{ _id: myUserIdDto.userId },
Expand Down

0 comments on commit 7d03b17

Please sign in to comment.