응원 전체보기 API 추가
This commit is contained in:
parent
ad66be3449
commit
ed78959817
|
@ -96,4 +96,15 @@ class ExplorerController(private val service: ExplorerService) {
|
||||||
if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
|
if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
|
||||||
ApiResponse.ok(service.getFollowerList(creatorId, member, pageable))
|
ApiResponse.ok(service.getFollowerList(creatorId, member, pageable))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/profile/{id}/cheers")
|
||||||
|
fun getCreatorProfileCheers(
|
||||||
|
@PathVariable("id") creatorId: Long,
|
||||||
|
@RequestParam timezone: String,
|
||||||
|
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?,
|
||||||
|
pageable: Pageable
|
||||||
|
) = run {
|
||||||
|
if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
|
||||||
|
ApiResponse.ok(service.getCreatorProfileCheers(creatorId, timezone, pageable))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -353,6 +353,19 @@ class ExplorerService(
|
||||||
cheersRepository.save(cheers)
|
cheersRepository.save(cheers)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getCreatorProfileCheers(
|
||||||
|
creatorId: Long,
|
||||||
|
timezone: String,
|
||||||
|
pageable: Pageable
|
||||||
|
): GetCheersResponse {
|
||||||
|
return queryRepository.getCheersList(
|
||||||
|
creatorId = creatorId,
|
||||||
|
timezone = timezone,
|
||||||
|
offset = pageable.offset,
|
||||||
|
limit = pageable.pageSize.toLong()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
fun modifyCheers(request: PutWriteCheersRequest, member: Member) {
|
fun modifyCheers(request: PutWriteCheersRequest, member: Member) {
|
||||||
val cheers = queryRepository.getCheers(request.cheersId, member.id!!)
|
val cheers = queryRepository.getCheers(request.cheersId, member.id!!)
|
||||||
|
|
Loading…
Reference in New Issue