Skip to content

Commit

Permalink
chore: replace APPLICATION_JSON with TEXT_PLAIN in dynamic create…
Browse files Browse the repository at this point in the history
… graph api (#1888)
  • Loading branch information
simon824 authored May 18, 2022
1 parent 335f0ea commit 88d71e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public class API {

public static final String CHARSET = "UTF-8";

public static final String TEXT_PLAIN = MediaType.TEXT_PLAIN;
public static final String APPLICATION_JSON = MediaType.APPLICATION_JSON;
public static final String APPLICATION_JSON_WITH_CHARSET =
APPLICATION_JSON + ";charset=" + CHARSET;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.Map;
import java.util.Set;

import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.security.RolesAllowed;
import jakarta.inject.Singleton;
Expand Down Expand Up @@ -124,7 +123,7 @@ public void drop(@Context GraphManager manager,
@POST
@Timed
@Path("{name}")
@Consumes(APPLICATION_JSON_WITH_CHARSET)
@Consumes(TEXT_PLAIN)
@Produces(APPLICATION_JSON_WITH_CHARSET)
@RolesAllowed({"admin"})
public Object create(@Context GraphManager manager,
Expand Down

0 comments on commit 88d71e7

Please sign in to comment.