feat: Utilisation d'une clef API Docuseal par établissement

This commit is contained in:
N3WT DE COMPET
2025-05-30 14:19:01 +02:00
parent 8cf22905e5
commit 23ab7d04ef
21 changed files with 256 additions and 134 deletions

View File

@ -3,13 +3,15 @@ import { BE_DOCUSEAL_GET_JWT } from '@/utils/Url';
export default function handler(req, res) {
if (req.method === 'POST') {
const { apiDocuseal, ...rest } = req.body;
fetch(BE_DOCUSEAL_GET_JWT, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Auth-Token': process.env.DOCUSEAL_API_KEY,
'X-Auth-Token': apiDocuseal,
},
body: JSON.stringify(req.body),
body: JSON.stringify(rest),
})
.then((response) => {
logger.debug('Response status:', response.status);