Skip to content

Commit 2b34176

Browse files
committed
URL PATH of Actions - Controller Methods Refactoring
1 parent d6f91c8 commit 2b34176

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/main/java/org/woehlke/simpleworklist/project/ProjectController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ public final String deleteProject(
230230
}
231231
}
232232
if( newProjectId == 0){
233-
return "redirect:/project/root";
233+
return "redirect:/project/root/tasks";
234234
} else {
235235
return "redirect:/project/" + newProjectId;
236236
}

src/main/java/org/woehlke/simpleworklist/project/ProjectRootController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public ProjectRootController(
4141
this.taskMoveService = taskMoveService;
4242
}
4343

44-
@RequestMapping(path = "/", method = RequestMethod.GET)
44+
@RequestMapping(path = "/tasks", method = RequestMethod.GET)
4545
public final String showRootProject(
4646
@PageableDefault(sort = "orderIdProject") Pageable pageable,
4747
@RequestParam(required = false) String message,
@@ -164,7 +164,7 @@ public final String addNewTaskToRootProjectPost(
164164
task.setOrderIdTaskState(++maxOrderIdTaskState);
165165
task = taskService.saveAndFlush(task);
166166
log.info(task.toString());
167-
return "redirect:/project/root/";
167+
return "redirect:/project/root/tasks";
168168
}
169169
}
170170
}

src/main/java/org/woehlke/simpleworklist/task/TaskController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public final String editTaskPost(
116116
}
117117
userSession.setContextId(task.getContext().getId());
118118
model.addAttribute("userSession", userSession);
119-
return "redirect:/project/root";
119+
return "redirect:/project/root/tasks";
120120
}
121121
taskService.saveAndFlush(persistentTask);
122122
return "redirect:/project/" + projectId + "/";

0 commit comments

Comments
 (0)