Merge branch '11-add-api-for-getting-home-page-data' into 22-integrate-api-and-frontend
This commit is contained in:
commit
c55c18c746
@ -1,12 +0,0 @@
|
|||||||
package de.uni_passau.fim.PADAS.group3.DataDash.controler;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
|
|
||||||
@Controller
|
|
||||||
public class PageController {
|
|
||||||
@GetMapping("/add")
|
|
||||||
public String getAddPage() {
|
|
||||||
return "add";
|
|
||||||
}
|
|
||||||
}
|
|
@ -50,7 +50,7 @@ public class Dataset {
|
|||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Category categorie;
|
private Category categorie;
|
||||||
|
|
||||||
public Dataset(String title, String abst, String description, String author, URL url, Category categories, Type type) {
|
public Dataset(String title, String abst, String description, String author, URL url, Category categories, Type type, String licence) {
|
||||||
|
|
||||||
this.raiting = 0;
|
this.raiting = 0;
|
||||||
this.votes = 0;
|
this.votes = 0;
|
||||||
@ -63,6 +63,7 @@ public class Dataset {
|
|||||||
setCategorie(categories);
|
setCategorie(categories);
|
||||||
setType(type);
|
setType(type);
|
||||||
setUrl(url);
|
setUrl(url);
|
||||||
|
setLicence(licence);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dataset() {
|
public Dataset() {
|
||||||
|
@ -25,7 +25,7 @@ public class LoadDummyDatabase {
|
|||||||
Category category = new Category("Category" + i);
|
Category category = new Category("Category" + i);
|
||||||
log.info("Preloading" + categoryRepository.save(category));
|
log.info("Preloading" + categoryRepository.save(category));
|
||||||
|
|
||||||
Dataset dataset = new Dataset("Title" + i, "Abst" + i, "Description" + i, "Author" + i,null, category, Type.API);
|
Dataset dataset = new Dataset("Title" + i, "Abst" + i, "Description" + i, "Author" + i,null, category, Type.API, "MIT");
|
||||||
for (int j = 0; j < new Random().nextInt(50); j++) {
|
for (int j = 0; j < new Random().nextInt(50); j++) {
|
||||||
dataset.upvote();
|
dataset.upvote();
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ for (const downvoteButton of downvoteButtons) {
|
|||||||
|
|
||||||
// functions of the main page
|
// functions of the main page
|
||||||
function navigateToAdd() {
|
function navigateToAdd() {
|
||||||
window.location.href = "/add"; //TODO: move to EventListner?
|
window.location.href = "/add.html"; //TODO: move to EventListener?
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFilterQuery() {
|
function getFilterQuery() {
|
||||||
|
Loading…
Reference in New Issue
Block a user