Skip to content

Commit

Permalink
[FIX] Bug between Kaelly & Kaelly-portals when the server contains so…
Browse files Browse the repository at this point in the history
…me spaces
  • Loading branch information
Kaysoro committed Mar 22, 2021
1 parent 5d17698 commit e8495f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/finders/PortalFinder.java
Expand Up @@ -36,7 +36,7 @@ public PortalFinder() {

public List<PortalDto> getPositions(ServerDofus server, Language lg) {
return client.target(ClientConfig.KAELLY_PORTALS_URL() + API_BASE_URL + SERVER_DOMAIN
+ server.getName().replace("-","_").toUpperCase() + PORTAL_DOMAIN)
+ server.getName().replaceAll("-","_").replaceAll("\\s+","_").toUpperCase() + PORTAL_DOMAIN)
.request(MediaType.APPLICATION_JSON)
.acceptLanguage(lg.getAbrev())
.get()
Expand All @@ -45,7 +45,7 @@ public List<PortalDto> getPositions(ServerDofus server, Language lg) {

public PortalDto getPosition(ServerDofus server, Dimension dimension, Language lg) {
return client.target(ClientConfig.KAELLY_PORTALS_URL() + API_BASE_URL+ SERVER_DOMAIN
+ server.getName().replace("-","_").toUpperCase() + PORTAL_DOMAIN + dimension.name().toUpperCase())
+ server.getName().replaceAll("-","_").replaceAll("\\s+","_").toUpperCase() + PORTAL_DOMAIN + dimension.name().toUpperCase())
.request(MediaType.APPLICATION_JSON)
.acceptLanguage(lg.getAbrev())
.get(PortalDto.class);
Expand Down

0 comments on commit e8495f2

Please sign in to comment.