diff --git a/prototype/src/main/java/org/hso/ecommerce/controller/intern/customers/CustomersIndexController.java b/prototype/src/main/java/org/hso/ecommerce/controller/intern/customers/CustomersIndexController.java index 3432770..b8fa7cf 100644 --- a/prototype/src/main/java/org/hso/ecommerce/controller/intern/customers/CustomersIndexController.java +++ b/prototype/src/main/java/org/hso/ecommerce/controller/intern/customers/CustomersIndexController.java @@ -1,9 +1,5 @@ package org.hso.ecommerce.controller.intern.customers; -import java.util.List; - -import javax.servlet.http.HttpServletRequest; - import org.hso.ecommerce.controller.intern.accounting.AccountingController; import org.hso.ecommerce.controller.intern.accounting.AccountingController.ShortTemplateBookingResult; import org.hso.ecommerce.entities.booking.Booking; @@ -13,12 +9,13 @@ import org.hso.ecommerce.repos.booking.BookingRepository; import org.hso.ecommerce.repos.shop.CustomerOrderRepository; import org.hso.ecommerce.repos.user.UserRepository; import org.springframework.beans.factory.annotation.Autowired; - import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.util.List; import java.util.Optional; @Controller @@ -104,17 +101,17 @@ public class CustomersIndexController { ) { if (!password.equals(password2)) { request.setAttribute("error", "Passwörter stimmen nicht überein!"); - return "/intern/customers/id"; + return "intern/customers/id"; } User user = userRepository.findById(id).get(); if (!user.validatePassword(password)) { request.setAttribute("error", "Die Passwörter stimmen nicht mit dem Original überein!"); - return "/intern/customers/id"; + return "intern/customers/id"; } user.setPassword("12345"); userRepository.save(user); request.setAttribute("info", "Passwort wurde auf 12345 geändert!"); - return "/intern/customers/id"; + return "intern/customers/id"; } } diff --git a/prototype/src/main/java/org/hso/ecommerce/controller/shop/ShopSearchController.java b/prototype/src/main/java/org/hso/ecommerce/controller/shop/ShopSearchController.java index 47b8acf..8e8980c 100644 --- a/prototype/src/main/java/org/hso/ecommerce/controller/shop/ShopSearchController.java +++ b/prototype/src/main/java/org/hso/ecommerce/controller/shop/ShopSearchController.java @@ -7,7 +7,9 @@ import org.hso.ecommerce.repos.shop.CategoryRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -45,6 +47,6 @@ public class ShopSearchController { return "error/404"; } - return "/shop/search"; + return "shop/search"; } } \ No newline at end of file