From 85ea3dd5f55d51e90f0e036dfa70df6d4a6dd959 Mon Sep 17 00:00:00 2001 From: s5260822 Date: Sat, 22 Mar 2025 23:01:39 +0100 Subject: [PATCH] moved tex export request to /pdf sub path --- .../project/gruppe_05_1/rest/RESTHandler.java | 10 +++++----- .../gruppe_05_1/rest/SpeechesExportController.java | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/texttechnologylab/project/gruppe_05_1/rest/RESTHandler.java b/src/main/java/org/texttechnologylab/project/gruppe_05_1/rest/RESTHandler.java index 7db4d8d..7226b07 100644 --- a/src/main/java/org/texttechnologylab/project/gruppe_05_1/rest/RESTHandler.java +++ b/src/main/java/org/texttechnologylab/project/gruppe_05_1/rest/RESTHandler.java @@ -66,10 +66,10 @@ public class RESTHandler { app.get("/reden", SpeechController::listAllSpeeches); // zeige alle Reden an (Filtern möglich) - app.get("/export/speech/{id}", SpeechesExportController::exportSpeech); // exportiere eine Rede als PDF - app.get("/export/speaker/{id}", SpeechesExportController::exportSpeechesFromSpeaker); // exportiere alle Reden eines Parlamentariers als PDF - app.get("/export/topic/{topic}", SpeechesExportController::exportSpeechesWithTopic); // exportiere alle Reden zu einem Thema als PDF - app.get("/export/all", SpeechesExportController::exportAllSpeeches); // exportiere alle Reden als PDF CAUTION!!!: This will take forever but is required in the exercise - app.get("/export/speeches/{speechIds}", SpeechesExportController::exportSpeeches); // exportiere eine Liste von Reden als PDF + app.get("/export/pdf/speech/{id}", SpeechesExportController::exportSpeech); // exportiere eine Rede als PDF + app.get("/export/pdf/speaker/{id}", SpeechesExportController::exportSpeechesFromSpeaker); // exportiere alle Reden eines Parlamentariers als PDF + app.get("/export/pdf/topic/{topic}", SpeechesExportController::exportSpeechesWithTopic); // exportiere alle Reden zu einem Thema als PDF + app.get("/export/pdf/all", SpeechesExportController::exportAllSpeeches); // exportiere alle Reden als PDF CAUTION!!!: This will take forever but is required in the exercise + app.get("/export/pdf/speeches/{speechIds}", SpeechesExportController::exportSpeeches); // exportiere eine Liste von Reden als PDF } } diff --git a/src/main/java/org/texttechnologylab/project/gruppe_05_1/rest/SpeechesExportController.java b/src/main/java/org/texttechnologylab/project/gruppe_05_1/rest/SpeechesExportController.java index d053b38..c6ecf99 100644 --- a/src/main/java/org/texttechnologylab/project/gruppe_05_1/rest/SpeechesExportController.java +++ b/src/main/java/org/texttechnologylab/project/gruppe_05_1/rest/SpeechesExportController.java @@ -19,7 +19,7 @@ public class SpeechesExportController { summary = "Get a speech as a PDF", description = "Returns a LaTeX generated pdf of a selected speech", operationId = "getSpeechExport", - path = "/export/speech/{id}", + path = "/export/pdf/speech/{id}", methods = HttpMethod.GET, tags = {"Export", "Speeches", "PDF"}, responses = { @@ -62,7 +62,7 @@ public class SpeechesExportController { summary = "Get all speeches from a speaker as a PDF", description = "Returns a LaTeX generated pdf of all speeches of a selected speech", operationId = "getSpeechesFromSpeakerExport", - path = "/export/speaker/{id}", + path = "/export/pdf/speaker/{id}", methods = HttpMethod.GET, tags = {"Export", "Speeches", "PDF"}, responses = { @@ -106,7 +106,7 @@ public class SpeechesExportController { summary = "Get all speeches as a PDF", description = "Returns a LaTeX generated pdf of all speeches", operationId = "getAllSpeeches", - path = "/export/all", + path = "/export/pdf/all", methods = HttpMethod.GET, tags = {"Export", "Speeches", "PDF"}, responses = { @@ -150,7 +150,7 @@ public class SpeechesExportController { summary = "Get all speeches with specific topic as a PDF", description = "Returns a LaTeX generated pdf of all speeches with specific topic", operationId = "getAllSpeechesWithTopic", - path = "/export/topic/{topic}", + path = "/export/pdf/topic/{topic}", methods = HttpMethod.GET, tags = {"Export", "Speeches", "PDF"}, responses = { @@ -194,7 +194,7 @@ public class SpeechesExportController { summary = "Get speeches by IDs as a PDF", description = "Returns a LaTeX-generated PDF of the speeches specified by their IDs", operationId = "getSpeechesByIds", - path = "/export/speeches/{speechIds}", // Comma-separated IDs + path = "/export/pdf/speeches/{speechIds}", // Comma-separated IDs methods = HttpMethod.GET, tags = {"Export", "Speeches", "PDF"}, responses = {