@ RequestMapping ( value = "/api/scripts" , method = RequestMethod . POST ) public @ ResponseBody Script addScript ( Model model , @ RequestParam ( required = true ) String name , @ RequestParam ( required = true ) String script ) throws Exception { return ScriptService . getInstance ( ) . addScript ( name , script ) ; }
Add a new script