Postman tests up
[portal.git] / portal-BE / src / main / java / org / onap / portal / controller / LanguageController.java
index 2ea4ff2..97fe03d 100644 (file)
@@ -54,6 +54,7 @@ import org.onap.portal.service.fn.FnUserService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -102,8 +103,8 @@ public class LanguageController {
               return new FnLanguage();
        }
 
-       @PostMapping(value = "/language")
-       public PortalRestResponse<String> saveLanguage(final Principal principal, final FnLanguage fnLanguage){
+       @PostMapping(value = "/language", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+       public PortalRestResponse<String> saveLanguage(final Principal principal, @RequestBody final FnLanguage fnLanguage){
               PortalRestResponse<String> response = new PortalRestResponse<>();
               try {
                      response.setMessage("SUCCESS");