#24 todo app
This commit is contained in:
@@ -20,7 +20,7 @@ import java.nio.file.Path;
|
||||
import java.util.Optional;
|
||||
|
||||
@Controller
|
||||
public class NotesController implements InitializingBean {
|
||||
public class NotesController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(NotesController.class);
|
||||
|
||||
@Autowired
|
||||
@@ -42,6 +42,8 @@ public class NotesController implements InitializingBean {
|
||||
|
||||
@GetMapping("/notes")
|
||||
public String start(Model model, @RequestParam(required = false) String notePath) {
|
||||
this.filesService.createAppDirectoryIfNotExists(this.app);
|
||||
|
||||
final Optional<Path> optNotePath = notePathToPath(notePath);
|
||||
|
||||
if(optNotePath.isPresent()) {
|
||||
@@ -121,9 +123,4 @@ public class NotesController implements InitializingBean {
|
||||
|
||||
return "redirect:?notePath=" + currentPath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
//this.filesService.createAppDirectory(this.app);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user