backend-api #6
.gitea/workflows
.gitignoreMakefileMyINPulse-back
build.gradle
src
main
java
enseirb
myinpulse
MyinpulseApplication.java
api
config
controller
exception
model
Administrator.javaAnnotation.javaAppointment.javaEntrepreneur.javaMakeAppointment.javaProject.javaProjectDecision.javaProjectDecisionValue.javaReport.javaRoleRepresentation.javaSectionCell.javaUser.javaUserRepresentation.java
repository
AdministratorRepository.javaAnnotationRepository.javaAppointmentRepository.javaEntrepreneurRepository.javaMakeAppointmentRepository.javaProjectRepository.javaReportRepository.javaSectionCellRepository.javaUserRepository.java
security
service
resources
test
java
enseirb
resources
config
backdev.docker-compose.yamlbackdev.envbackdev.front.envbackdev.main.envdev.docker-compose.yamldev.envfrontdev.docker-compose.yamlfrontdev.envfrontdev.front.envfrontdev.main.envprod.docker-compose.yamlprod.envprod.front.envprod.main.env
documentation
front/MyINPulse-front/src
hooks
postgres
@ -10,7 +10,6 @@ import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
|||||||
import org.springframework.security.oauth2.jwt.Jwt;
|
import org.springframework.security.oauth2.jwt.Jwt;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@ -84,8 +83,10 @@ public class SharedApi {
|
|||||||
@PathVariable int appointmentId, @AuthenticationPrincipal Jwt principal) {
|
@PathVariable int appointmentId, @AuthenticationPrincipal Jwt principal) {
|
||||||
try {
|
try {
|
||||||
sharedApiService.getPDFReport(appointmentId, principal.getClaimAsString("email"));
|
sharedApiService.getPDFReport(appointmentId, principal.getClaimAsString("email"));
|
||||||
} catch (FileNotFoundException | DocumentException e) {
|
} catch (FileNotFoundException e) {
|
||||||
System.out.println(e);
|
System.out.println(e + "File not found");
|
||||||
|
} catch (DocumentException e) {
|
||||||
|
System.out.println(e + "Document exception");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user