From e2f35b1e48d7966a29d0265e9f2eb9d51bbba07e Mon Sep 17 00:00:00 2001 From: Sasha Didukh Date: Fri, 22 Jul 2016 21:15:10 +0300 Subject: [PATCH] KAA-1108: Fix tests --- .../server/admin/controller/ConfigurationController.java | 2 +- .../kaa/server/admin/controller/LoggingController.java | 7 +++---- .../server/admin/controller/NotificationController.java | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/server/node/src/main/java/org/kaaproject/kaa/server/admin/controller/ConfigurationController.java b/server/node/src/main/java/org/kaaproject/kaa/server/admin/controller/ConfigurationController.java index 4b475445d9..392224f107 100644 --- a/server/node/src/main/java/org/kaaproject/kaa/server/admin/controller/ConfigurationController.java +++ b/server/node/src/main/java/org/kaaproject/kaa/server/admin/controller/ConfigurationController.java @@ -138,7 +138,7 @@ public ConfigurationSchemaDto getConfigurationSchema( @ApiResponse(code = 403, message = "The authenticated user does not have the required role (TENANT_DEVELOPER or TENANT_USER) or the Tenant ID " + "of the application does not match the Tenant ID of the authenticated user"), @ApiResponse(code = 500, message = "An unexpected error occurred on the server side")}) - @RequestMapping(value = "saveConfigurationSchema", method = RequestMethod.POST, consumes = {"multipart/mixed", "multipart/form-data"}) + @RequestMapping(value = "saveConfigurationSchema", method = RequestMethod.POST) @ResponseBody public ConfigurationSchemaDto saveConfigurationSchema( @ApiParam(name = "configurationSchema", value = "ConfigurationSchemaDto body", required = true) diff --git a/server/node/src/main/java/org/kaaproject/kaa/server/admin/controller/LoggingController.java b/server/node/src/main/java/org/kaaproject/kaa/server/admin/controller/LoggingController.java index 95f7972c41..9c5c2f7874 100644 --- a/server/node/src/main/java/org/kaaproject/kaa/server/admin/controller/LoggingController.java +++ b/server/node/src/main/java/org/kaaproject/kaa/server/admin/controller/LoggingController.java @@ -144,10 +144,9 @@ public LogSchemaDto getLogSchemaByApplicationTokenAndVersion( * @throws KaaAdminServiceException * the kaa admin service exception */ - @RequestMapping(value = "createLogSchema", method = RequestMethod.POST, consumes = {"multipart/mixed", "multipart/form-data"}) + @RequestMapping(value = "createLogSchema", method = RequestMethod.POST) @ResponseBody - public LogSchemaDto createLogSchema( - @RequestPart("logSchema") LogSchemaDto logSchema) + public LogSchemaDto createLogSchema(@RequestBody LogSchemaDto logSchema) throws KaaAdminServiceException { return loggingService.saveLogSchema(logSchema); } @@ -171,7 +170,7 @@ public LogSchemaDto createLogSchema( @ApiResponse(code = 500, message = "An unexpected error occurred on the server side")}) @RequestMapping(value = "saveLogSchema", method = RequestMethod.POST) @ResponseBody - public LogSchemaDto editLogSchema( + public LogSchemaDto saveLogSchema( @ApiParam(name = "logSchema", value = "LogSchemaDto body.", required = true) @RequestBody LogSchemaDto logSchema) throws KaaAdminServiceException { return loggingService.saveLogSchema(logSchema); diff --git a/server/node/src/main/java/org/kaaproject/kaa/server/admin/controller/NotificationController.java b/server/node/src/main/java/org/kaaproject/kaa/server/admin/controller/NotificationController.java index 950f8a9ae0..e37f3c37bf 100644 --- a/server/node/src/main/java/org/kaaproject/kaa/server/admin/controller/NotificationController.java +++ b/server/node/src/main/java/org/kaaproject/kaa/server/admin/controller/NotificationController.java @@ -126,7 +126,7 @@ public NotificationSchemaDto getNotificationSchema( * @return the notification schema dto * @throws KaaAdminServiceException the kaa admin service exception */ - @RequestMapping(value = "createNotificationSchema", method = RequestMethod.POST, consumes = {"multipart/mixed", "multipart/form-data"}) + @RequestMapping(value = "createNotificationSchema", method = RequestMethod.POST) @ResponseBody public NotificationSchemaDto createNotificationSchema(@RequestBody NotificationSchemaDto notificationSchema) throws KaaAdminServiceException { return notificationService.saveNotificationSchema(notificationSchema); @@ -153,7 +153,7 @@ public NotificationSchemaDto createNotificationSchema(@RequestBody NotificationS @ApiResponse(code = 500, message = "An unexpected error occurred on the server side")}) @RequestMapping(value = "saveNotificationSchema", method = RequestMethod.POST) @ResponseBody - public NotificationSchemaDto editNotificationSchema( + public NotificationSchemaDto saveNotificationSchema( @ApiParam(name = "notificationSchema", value = "NotificationSchemaDto body.", required = true) @RequestBody NotificationSchemaDto notificationSchema) throws KaaAdminServiceException {