Skip to content

Commit

Permalink
Fix charset on /data controller
Browse files Browse the repository at this point in the history
The global http settings in the application.yml seem to not work with
manually defined media types.
  • Loading branch information
Brutus5000 committed Nov 2, 2019
1 parent 0caef2b commit eec7c70
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
@RequiredArgsConstructor
public class AchievementsController {

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

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/faforever/api/data/JsonApiMediaType.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.faforever.api.data;

public class JsonApiMediaType {
public static final String JSON_API_MEDIA_TYPE = "application/vnd.api+json";
public static final String JSON_API_PATCH_MEDIA_TYPE = "application/vnd.api+json;ext=jsonpatch";
public static final String JSON_API_MEDIA_TYPE = "application/vnd.api+json;charset=utf-8";
public static final String JSON_API_PATCH_MEDIA_TYPE = "application/vnd.api+json;ext=jsonpatch;charset=utf-8";
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
@RequiredArgsConstructor
public class EventsController {

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

@ApiOperation(value = "Updates the state and progress of one or multiple events.")
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/faforever/api/voting/VotingController.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
Expand All @@ -26,7 +25,6 @@
@RequiredArgsConstructor
public class VotingController {
static final String PATH = "/voting";
private static final String JSON_API_MEDIA_TYPE = "application/vnd.api+json";
private final VotingService votingService;
private final PlayerService playerService;

Expand Down

0 comments on commit eec7c70

Please sign in to comment.