From 7a05fc1316cda1370d94b70cda20cd9c454ae311 Mon Sep 17 00:00:00 2001 From: Bartha Maxime <231026@umons.ac.be> Date: Wed, 17 Apr 2024 00:26:56 +0200 Subject: [PATCH] fixed spelling mistake --- .../ovh/herisson/Clyde/EndPoints/MockController.java | 2 +- .../ScientificPublications/ResearchController.java | 2 +- .../ScientificPublications/ResearchesService.java | 2 +- .../Apps/ScientificPublications/ResearchComponent.vue | 4 +--- .../Apps/ScientificPublications/ResearcherProfile.vue | 10 +++++----- .../rest/ScientificPublications/ResearcherProfile.js | 3 +++ 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java index 166e64b..f9fe3f9 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java @@ -113,7 +113,7 @@ public class MockController { Researcher output = researchesService.saveResearcher(jojoResearcherAccount); Research jojoResearch = new Research("Graphs : Advanced Search Algorithms",output,new Date(0), - PaperType.Article,"here",null,"english", + PaperType.Article,"here.pdf",null,"english", Access.OpenSource,"IT","This Article's title speaks for itself \n We'll discuss about advanced Graph search Algorithms"); Research restrictedResearch = new Research("just another Name",output,new Date(1111111111), diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ScientificPublications/ResearchController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ScientificPublications/ResearchController.java index 8a266a2..b8a4342 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ScientificPublications/ResearchController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ScientificPublications/ResearchController.java @@ -229,7 +229,7 @@ public class ResearchController { /////// //views part - @PostMapping("/addView{url}") + @PostMapping("/addView/{url}") public ResponseEntity addView(@PathVariable String url){ Research research = researchesServ.getResearchByUrl(url); if (research ==null) return new ResponseEntity<>(HttpStatus.NOT_FOUND); diff --git a/backend/src/main/java/ovh/herisson/Clyde/Services/ScientificPublications/ResearchesService.java b/backend/src/main/java/ovh/herisson/Clyde/Services/ScientificPublications/ResearchesService.java index 0d601c7..a9c337d 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Services/ScientificPublications/ResearchesService.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Services/ScientificPublications/ResearchesService.java @@ -194,6 +194,6 @@ public class ResearchesService { public Research addView(Research research) { research.setViews(research.getViews()+1); - articleRepo.save(research); + return articleRepo.save(research); } } diff --git a/frontend/src/Apps/ScientificPublications/ResearchComponent.vue b/frontend/src/Apps/ScientificPublications/ResearchComponent.vue index 48c27e8..dd4316e 100644 --- a/frontend/src/Apps/ScientificPublications/ResearchComponent.vue +++ b/frontend/src/Apps/ScientificPublications/ResearchComponent.vue @@ -46,9 +46,7 @@ onClickOutside(target, ()=>emit('modal-close'))
-
- -
+
diff --git a/frontend/src/Apps/ScientificPublications/ResearcherProfile.vue b/frontend/src/Apps/ScientificPublications/ResearcherProfile.vue index 39180d3..bbd22f5 100644 --- a/frontend/src/Apps/ScientificPublications/ResearcherProfile.vue +++ b/frontend/src/Apps/ScientificPublications/ResearcherProfile.vue @@ -9,7 +9,7 @@ import { ref, reactive } from "vue"; import FilterComponent from "@/Apps/ScientificPublications/FilterComponent.vue"; import ArticleComponent from "@/Apps/ScientificPublications/ResearchComponent.vue"; -import {fetchResearcher, fetchResearches, fetchStats, addView} from "@/rest/ScientificPublications/ResearcherProfile.js"; +import {fetchResearcher, fetchResearches, fetchStats, addView, getFile} from "@/rest/ScientificPublications/ResearcherProfile.js"; const input = ref(""); const statsOf = ref(""); const statsBy = ref(""); @@ -48,12 +48,12 @@ const closeResearch = () => { } const downloadBibTex = (research) => { -//todo + getFile(research.bibTexLocation) } const downloadArticle = (research) => { - addView(research.url) - + addView(research.pdfLocation) + getFile(research.pdfLocation) } function downloadCoAuthors(){ @@ -131,7 +131,7 @@ function update(){