Browse Source

move /user to separate RequestController

pull/4/head
Jannik Seiler 2 months ago
parent
commit
26b64b8ab4
Signed by: Seil0 <seil0@mosad.xyz> GPG Key ID: E8459F3723C52C24
3 changed files with 36 additions and 27 deletions
  1. +1
    -1
      .gitignore
  2. +0
    -26
      prototype/src/main/java/org/hso/ecommerce/app/RequestController.java
  3. +35
    -0
      prototype/src/main/java/org/hso/ecommerce/app/UserRequestController.java

+ 1
- 1
.gitignore View File

@@ -88,4 +88,4 @@ local.properties
*.launch

# SQLite
prototype/src/main/resources/*.db
prototype/*.db

+ 0
- 26
prototype/src/main/java/org/hso/ecommerce/app/RequestController.java View File

@@ -95,32 +95,6 @@ public class RequestController {
}
}

@GetMapping("/user/")
public String user() {
return "redirect:/user/settings";
}

@GetMapping("/user/settings")
public String userSettings() {
return "user/settings";
}


@GetMapping("/user/orders/")
public String userOrdeers() {
return "user/orders/index";
}

@GetMapping("/user/bonuspoints")
public String userBonuspoints() {
return "user/bonuspoints";
}

@GetMapping("/user/notifications/")
public String userNotifications() {
return "user/notifications/index";
}

@GetMapping("/about")
public String about() {
return "about";


+ 35
- 0
prototype/src/main/java/org/hso/ecommerce/app/UserRequestController.java View File

@@ -0,0 +1,35 @@
package org.hso.ecommerce.app;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("user")
public class UserRequestController {

@GetMapping("/")
public String user() {
return "redirect:/user/settings";
}

@GetMapping("/settings")
public String userSettings() {
return "user/settings";
}


@GetMapping("/orders/")
public String userOrdeers() { return "user/orders/index"; }

@GetMapping("/bonuspoints")
public String userBonuspoints() {
return "user/bonuspoints";
}

@GetMapping("/notifications/")
public String userNotifications() {
return "user/notifications/index";
}

}

Loading…
Cancel
Save