commit 12b632927ebb165fca676727d4bdb5135d5eebab
parent 8680baa7fbd65793bf15ec7e8aa4a50a972041be
Author: WimDupont <WimDupont@users.noreply.gitlab.com>
Date: Fri, 20 Aug 2021 20:20:40 +0200
cleanup
Diffstat:
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/src/main/java/com/wimdupont/personalweb/controller/BlogController.java b/src/main/java/com/wimdupont/personalweb/controller/BlogController.java
@@ -1,8 +1,6 @@
package com.wimdupont.personalweb.controller;
-import com.wimdupont.personalweb.service.BlogArticleGenerator;
import com.wimdupont.personalweb.util.Constants;
-import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
@@ -22,15 +20,11 @@ import java.util.List;
@Slf4j
@Controller
@RequestMapping("/blog")
-@RequiredArgsConstructor
+@SuppressWarnings("unused")
public class BlogController {
- private final BlogArticleGenerator blogArticleGenerator;
-
- @SuppressWarnings("unused")
@GetMapping
- public String getBlog(Model model) throws IOException {
- blogArticleGenerator.generate();
+ public String getBlog(Model model) {
List<String> articles = new ArrayList<>();
File[] files = new File(String.format("%s/html", Constants.ARTICLES_DIRECTORY)).listFiles();
if (files != null) {
@@ -44,7 +38,6 @@ public class BlogController {
return "blog";
}
- @SuppressWarnings("unused")
@GetMapping(value = "/article/{name}")
public String getBlogArticle(@PathVariable(value = "name") String name, Model model) {
String article;