dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40088
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20297: System setting controller, return 200 on delete
------------------------------------------------------------
revno: 20297
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-09-22 17:27:57 +0200
message:
System setting controller, return 200 on delete
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java 2015-07-09 07:12:16 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java 2015-09-22 15:27:57 +0000
@@ -35,6 +35,7 @@
import org.hisp.dhis.webapi.utils.ContextUtils;
import org.hisp.dhis.webapi.utils.WebMessageUtils;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
@@ -44,9 +45,11 @@
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.ResponseStatus;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+
import java.io.IOException;
import java.io.Serializable;
import java.util.Map;
@@ -149,6 +152,7 @@
return value;
}
+ @ResponseStatus( value = HttpStatus.OK )
@RequestMapping( value = "/{key}", method = RequestMethod.DELETE )
@PreAuthorize( "hasRole('ALL') or hasRole('F_SYSTEM_SETTING')" )
public void removeSystemSetting( @PathVariable( "key" ) String key )