Skip to content

Commit 37d7635

Browse files
committed
Fix charset on /data controller
The global http settings in the application.yml seem to not work with manually defined media types.
1 parent 22b89a1 commit 37d7635

4 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/main/java/com/faforever/api/achievements/AchievementsController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
@RequiredArgsConstructor
2626
public class AchievementsController {
2727

28-
private static final String JSON_API_MEDIA_TYPE = "application/vnd.api+json";
2928
private final AchievementService achievementService;
3029
private AtomicInteger nextUpdateId = new AtomicInteger();
3130

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.faforever.api.data;
22

33
public class JsonApiMediaType {
4-
public static final String JSON_API_MEDIA_TYPE = "application/vnd.api+json";
5-
public static final String JSON_API_PATCH_MEDIA_TYPE = "application/vnd.api+json;ext=jsonpatch";
4+
public static final String JSON_API_MEDIA_TYPE = "application/vnd.api+json;charset=utf-8";
5+
public static final String JSON_API_PATCH_MEDIA_TYPE = "application/vnd.api+json;ext=jsonpatch;charset=utf-8";
66
}

src/main/java/com/faforever/api/event/EventsController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
@RequiredArgsConstructor
2727
public class EventsController {
2828

29-
private static final String JSON_API_MEDIA_TYPE = "application/vnd.api+json";
3029
private final EventsService eventsService;
3130

3231
@ApiOperation(value = "Updates the state and progress of one or multiple events.")

src/main/java/com/faforever/api/voting/VotingController.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import org.springframework.web.bind.annotation.RequestMethod;
1616
import org.springframework.web.bind.annotation.RestController;
1717

18-
import javax.inject.Inject;
1918
import javax.servlet.http.HttpServletRequest;
2019
import javax.servlet.http.HttpServletResponse;
2120
import java.io.IOException;
@@ -26,7 +25,6 @@
2625
@RequiredArgsConstructor
2726
public class VotingController {
2827
static final String PATH = "/voting";
29-
private static final String JSON_API_MEDIA_TYPE = "application/vnd.api+json";
3028
private final VotingService votingService;
3129
private final PlayerService playerService;
3230

0 commit comments

Comments
 (0)