File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
src/main/kotlin/org/gitanimals/rank/app Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ class GivePointToGuildFacade(
40
40
runCatching {
41
41
val point = getPoint(rankResponse)
42
42
43
- val guild = guildApi.getGuildByTitle (rankResponse.name )
43
+ val guild = guildApi.getGuildById (rankResponse.id.toLong() )
44
44
givePointToLeader(guild, point)
45
45
givePointToMembers(guild, point)
46
46
}.onFailure {
Original file line number Diff line number Diff line change @@ -5,11 +5,14 @@ import org.springframework.web.bind.annotation.PathVariable
5
5
import org.springframework.web.service.annotation.GetExchange
6
6
import java.time.Instant
7
7
8
- fun interface GuildApi {
8
+ interface GuildApi {
9
9
10
10
@GetExchange(" /internals/guilds/by-title/{title}" )
11
11
fun getGuildByTitle (@PathVariable(" title" ) title : String ): GuildResponse
12
12
13
+ @GetExchange(" /guilds/{guildId}" )
14
+ fun getGuildById (@PathVariable(" guildId" ) guildId : Long ): GuildResponse
15
+
13
16
data class GuildResponse (
14
17
val id : String ,
15
18
val title : String ,
You can’t perform that action at this time.
0 commit comments