modify ScriptController

This commit is contained in:
zhengyingying 2014-04-04 11:33:02 +08:00
parent c7aac992cd
commit 3603b08369
2 changed files with 6 additions and 4 deletions

View File

@ -257,6 +257,7 @@ public class ScriptController extends BaseController {
public OperateScriptServerResponseModel queryScriptByName(
@RequestParam String name) {
if (!this.checkScope(UserService.NORAML_AUTHENTICATION)) {
return null;
}
return this.buildReponseModel(true, null, null, 0, null,
@ -278,12 +279,13 @@ public class ScriptController extends BaseController {
null);
}
@RequestMapping(value = "updateScript", method = { RequestMethod.GET,
RequestMethod.POST })
@RequestMapping(value = "updateScript/{scriptId}", method = {
RequestMethod.GET, RequestMethod.PUT })
@ResponseBody
public OperateScriptServerResponseModel updateScript(
@RequestParam int scriptId, @RequestParam String content) {
@PathVariable int scriptId, @RequestBody String content) {
if (!this.checkScope(UserService.NORAML_AUTHENTICATION)) {
Logger.getLogger(ScriptController.class).info("no power");
return null;
}
return this.buildReponseModel(

View File

@ -1,4 +1,4 @@
portToServe=7979
portToServe=8080
pickTestPlanCycleInSeconds=60
maxFailTime=10
minExcuteIntervalInSeconds=600