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 36c05d7..82fa22d 100644
--- a/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java
+++ b/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java
@@ -49,11 +49,16 @@ public class RequestController {
return "login";
}
- if (!user.get().validatePassword(password)) {
+ //TODO remove bypass
+
+ /*
+ if (!user.get().validatePassword(password)) {
request.setAttribute("error", "Passwort falsch.");
response.setStatus(HttpServletResponse.SC_EXPECTATION_FAILED);
return "login";
}
+
+ */
session.setAttribute("userId", user.get().getId());
diff --git a/prototype/src/main/java/org/hso/ecommerce/controller/intern/InternArticleController.java b/prototype/src/main/java/org/hso/ecommerce/controller/intern/InternArticleController.java
index df25756..70e7b19 100644
--- a/prototype/src/main/java/org/hso/ecommerce/controller/intern/InternArticleController.java
+++ b/prototype/src/main/java/org/hso/ecommerce/controller/intern/InternArticleController.java
@@ -10,6 +10,7 @@ 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.servlet.view.RedirectView;
@Controller
@RequestMapping("intern/articles")
@@ -51,22 +52,16 @@ public class InternArticleController {
}
- @PostMapping("/{id}")
- public String newEmployee( Model model, @PathVariable String id) {
+ @PostMapping("/{id}/saveChanges")
+ public RedirectView saveChanges() {
System.out.println("\n------ POST -----\n");
- int articleid = Integer.parseInt(id);
- ListedArticlesListIdTotal total = new ListedArticlesListIdTotal();
- total.addArticle(articleRepository.findArticleById(articleid),
- warehouseEntryRepository.getArticleStock(articleid).orElse(0));
- model.addAttribute("ArticleID", total);
-
- return "intern/listedArticles/id";
+ return new RedirectView("../");
}
diff --git a/prototype/src/main/resources/templates/intern/listedArticles/id.html b/prototype/src/main/resources/templates/intern/listedArticles/id.html
index 7097249..b694325 100644
--- a/prototype/src/main/resources/templates/intern/listedArticles/id.html
+++ b/prototype/src/main/resources/templates/intern/listedArticles/id.html
@@ -25,7 +25,7 @@
diff --git a/prototype/src/main/resources/templates/intern/listedArticles/index.html b/prototype/src/main/resources/templates/intern/listedArticles/index.html
index 028953a..e641c77 100644
--- a/prototype/src/main/resources/templates/intern/listedArticles/index.html
+++ b/prototype/src/main/resources/templates/intern/listedArticles/index.html
@@ -24,16 +24,15 @@