rectrouter version update

This commit is contained in:
djmil 2023-12-02 01:43:42 +01:00
parent 49dcd38ab3
commit 7f51cf32c2
2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,8 @@
package djmil.cordacheckers; package djmil.cordacheckers;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
@ -10,9 +11,8 @@ public class ReactAppController {
// This controller simply redirects all UI related routes // This controller simply redirects all UI related routes
// to index.html, allowing react and react-router to work its magic // to index.html, allowing react and react-router to work its magic
// @GetMapping(value = { "", "/", "/games", "/games/*", "/about","/leaderboard" }) @GetMapping(value = { "", "/", "/games", "/games/*", "/about","/leaderboard" })
// @PutMapping("/error") @PutMapping("/error")
@RequestMapping(value = { "/", "/{x:[\\w\\-]+}", "/{x:^(?!api$).*$}/*/{y:[\\w\\-]+}","/error" })
public String getIndex(HttpServletRequest inRequest) { public String getIndex(HttpServletRequest inRequest) {
return "/index.html"; return "/index.html";
} }

View File

@ -9,7 +9,7 @@
"fsevents": "^2.3.3", "fsevents": "^2.3.3",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-router-dom": "^6.16.0", "react-router-dom": "^6.20.1",
"react-scripts": "^5.0.1", "react-scripts": "^5.0.1",
"web-vitals": "^3.5.0" "web-vitals": "^3.5.0"
}, },