From e406918ca28d7a41f7e6b7ac2bca10898b3ad2e7 Mon Sep 17 00:00:00 2001 From: CodeSteak Date: Sun, 10 May 2020 16:57:33 +0200 Subject: [PATCH] Remove commend out code --- .../hso/ecommerce/app/RequestController.java | 71 ++----------------- 1 file changed, 4 insertions(+), 67 deletions(-) diff --git a/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java b/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java index 6ef7624..3adf74e 100644 --- a/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java +++ b/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java @@ -1,10 +1,12 @@ package org.hso.ecommerce.app; -import org.hso.ecommerce.repos.user.UserRepository; import org.hso.ecommerce.entities.user.User; +import org.hso.ecommerce.repos.user.UserRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestParam; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -22,11 +24,6 @@ public class RequestController { static int notSoRandom = 0; -// @GetMapping("/") -// public String home() { -// return "redirect:/shop/"; -// } - @GetMapping("/login") public String login() { return "login"; @@ -88,71 +85,11 @@ public class RequestController { return "redirect:/"; } -// @GetMapping("/shop/") -// public String shop() { -// return "shop/index"; -// } - @GetMapping("/shop/search") public String shopSearch() { return "shop/search"; } -/* @GetMapping("/shop/checkout") - public String shopCheckout(HttpSession session, HttpServletRequest request) { - session.setAttribute("afterLogin", request.getRequestURI()); - return "shop/checkout"; - } - - @PostMapping("/shop/checkoutFinish") - public String shopCheckoutFinish() { - return "shop/checkoutFinish"; - } - - @GetMapping("/shop/checkoutFinish") - public String shopCheckoutFinishGET() { - return "shop/checkoutFinish"; - }*/ - -// @GetMapping("/shop/articles/{id}") -// public String shopArticlesById() { -// return "shop/articles/id"; -// } -// -// @PostMapping("/shop/articles/{id}") -// public String shopArticlesByIdBuy(HttpSession session, -// @RequestAttribute(value = "user", required = false) User customer, -// @PathVariable("id") Integer id, -// @RequestParam("fastcheckout") Boolean fastcheckout -// ) { -// if (customer != null) { -// if (!fastcheckout) { -// return "shop/articles/post_add"; -// } else { -// return "shop/checkout"; -// } -// } else { -// session.setAttribute("afterLogin", "/shop/articles/" + id); -// return "redirect:/login"; -// } -// } - -// @GetMapping("/about") -// public String about() { -// return "about"; -// } -// -// @GetMapping("/terms") -// public String terms() { -// return "terms"; -// } -// -// @GetMapping("/privacy") -// public String privacy() { -// return "privacy"; -// } - - @GetMapping("/intern/") public String intern() { return "intern/index";