feat: Update URL construction for add page navigation

The code changes modify the `PageController` class to update the URL construction for navigating to the add page. The `getAddPage()` method now maps to the `/add` endpoint instead of the previous `add` endpoint. This change ensures that the URL matches the correct route for the add page.

Recent commits:
- Integrate add content page into backend
- Add base URL to URL construction
- Rework URL construction

Recent repository commits:
- Integrate add content page into backend
- Merge branch 'main' into 15-make-content-adding-page-functional-js
- Merge branch '11-add-api-for-getting-home-page-data' into 'main'
- Merge branch '22-integrate-api-and-frontend' into '11-add-api-for-getting-home-page-data'
- Merge branch '11-add-api-for-getting-home-page-data' into '22-integrate-api-and-frontend'
- feature: add ability to vote on datasets
- Merge remote-tracking branch 'origin/implement-js' into 22-integrate-api-and-frontend
- Add base URL to URL construction
- Merge remote-tracking branch 'origin/implement-js' into 22-integrate-api-and-frontend
- Rework URL construction
This commit is contained in:
Erik Foris 2024-06-25 11:33:36 +02:00
parent 4c8437be92
commit e400b7e9ce
2 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class PageController {
@GetMapping("add")
@GetMapping("/add")
public String getAddPage() {
return "add";
}

View File

@ -75,6 +75,7 @@ for (const downvoteButton of downvoteButtons) {
// functions of the main page
function navigateToAdd() {
//TODO: url to add page not yet implemented, add here
window.location.href = "/add";
}
function filter(filterString) {