move /user to separate RequestController
This commit is contained in:
		
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -88,4 +88,4 @@ local.properties
 | 
			
		||||
*.launch
 | 
			
		||||
 | 
			
		||||
# SQLite
 | 
			
		||||
prototype/src/main/resources/*.db
 | 
			
		||||
prototype/*.db
 | 
			
		||||
 | 
			
		||||
@ -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";
 | 
			
		||||
 | 
			
		||||
@ -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";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user