added (somewhat) functional front-end

This commit is contained in:
Valentijn van der Jagt
2025-12-29 23:06:07 +01:00
parent 1c2966b140
commit b619afe24f
4 changed files with 102 additions and 11 deletions

View File

@@ -1,12 +1,20 @@
package nl.herpiederpiee.appie_scraper;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.ArrayList;
@Controller
public class WebServer {
@GetMapping("/")
public String index() {
return "index"; // resolves to index.html in templates/
public String index(@RequestParam(value = "fuzzySearch", required = false) String fuzzySearch, Model model) {
// Call your BonusManager or service to get items
ArrayList<BonusItem> items = BonusManager.getBonusItems(fuzzySearch);
model.addAttribute("items", items);
return "index";
}
}
}