change delete module prompt information

This commit is contained in:
dawncx 2013-11-07 12:47:07 +08:00
parent eb8d421543
commit f513fe1e86
1 changed files with 5 additions and 3 deletions

View File

@ -76,10 +76,12 @@ public class ModuleController {
}
@RequestMapping(value = "/remove/{moduleId}", method = RequestMethod.GET)
public ModelAndView delete(@PathVariable UUID moduleId) {
public String delete(RedirectAttributes redirectAttributes,@PathVariable UUID moduleId) {
if (this.getModuleHelper().removeModule(moduleId)) {
return new ModelAndView("remove-success");
redirectAttributes.addFlashAttribute("uploadmessage","remove successed!");
return "redirect:/adminhome";
}
return new ModelAndView("remove-error");
redirectAttributes.addFlashAttribute("uploadmessage","remove failed!");
return "redirect:/adminhome";
}
}