Skip to content

Commit

Permalink
Update FormWsController.java
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemaignent authored Oct 24, 2022
1 parent 78b14f3 commit 17d18f9
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import org.esupportail.esupsignature.service.SignBookService;
import org.esupportail.esupsignature.service.SignRequestService;
import org.esupportail.esupsignature.service.export.DataExportService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

Expand All @@ -28,6 +30,8 @@
@RequestMapping("/ws/forms")
public class FormWsController {

private static final Logger logger = LoggerFactory.getLogger(FormWsController.class);

@Resource
private DataService dataService;

Expand Down Expand Up @@ -61,6 +65,7 @@ public Long start(@PathVariable Long id,
SignBook signBook = signBookService.sendForSign(data.getId(), recipientEmails, allSignToCompletes, null, targetEmails, targetUrls, eppn, eppn, true, datas, null, signRequestParamsJsonString, title);
return signBook.getSignRequests().get(0).getId();
} catch (EsupSignatureException | EsupSignatureIOException | EsupSignatureFsException | JsonProcessingException e) {
logger.error(e.getMessage(), e);
return -1L;
}
}
Expand Down Expand Up @@ -92,6 +97,7 @@ public Long startWithDoc(@PathVariable Long id,
signRequestService.addAttachement(attachementMultipartFiles, null, signBook.getSignRequests().get(0).getId());
return signBook.getSignRequests().get(0).getId();
} catch (EsupSignatureException | EsupSignatureIOException | EsupSignatureFsException | IOException e) {
logger.error(e.getMessage(), e);
return -1L;
}
}
Expand Down

0 comments on commit 17d18f9

Please sign in to comment.