Skip to content

Commit

Permalink
Merge pull request #161 from YAPP-19th/develop
Browse files Browse the repository at this point in the history
[#140] 버그 수정
  • Loading branch information
JuHyun419 authored Jul 1, 2022
2 parents df1c413 + aa32da2 commit eec7d85
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class AccountService(

log.info("base login => ${account.email} succeed")

return Account.AccountLoginSuccess(jwtProvider.createToken(account), account, false)
return Account.AccountLoginSuccess(jwtProvider.createToken(account), account, true)
}

fun comparePassword(token: String, dto: AccountRequestDto.CurrentPassword): String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ class FolderController(
}

@ApiOperation(value = "폴더의 이름 조회 API")
@GetMapping("name/{folderId}")
fun getFolderName(@PathVariable @ApiParam(value = "폴더 ID", example = "2", required = true) folderId: Long)
@GetMapping("name/{folderToken}")
fun getFolderName(@PathVariable @ApiParam(value = "폴더 ID", example = "2", required = true) folderToken: String)
: ResponseEntity<FolderDto.FolderNameDto> {
return ResponseEntity.status(HttpStatus.OK).body(folderService.getFolderName(folderId))
return ResponseEntity.status(HttpStatus.OK).body(folderService.getFolderName(folderToken))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,9 @@ class FolderService(
return AccountDto.FolderBelongAccountListDto(accountList)
}

fun getFolderName(folderId: Long): FolderDto.FolderNameDto {
val folder = folderRepository.findFolderById(folderId) ?: throw FolderNotFoundException()
fun getFolderName(folderToken: String): FolderDto.FolderNameDto {
val folderId = aeS256Util.decrypt(folderToken)
val folder = folderRepository.findFolderById(folderId.toLong()) ?: throw FolderNotFoundException()
return FolderDto.FolderNameDto(folder.name)
}
}

0 comments on commit eec7d85

Please sign in to comment.