chore: application prettier

This commit is contained in:
Luc SORIGNET
2025-04-15 19:37:47 +02:00
parent dd0884bbce
commit f7666c894b
174 changed files with 10609 additions and 8760 deletions

View File

@ -6,24 +6,26 @@ export default function handler(req, res) {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Auth-Token': process.env.DOCUSEAL_API_KEY
'X-Auth-Token': process.env.DOCUSEAL_API_KEY,
},
body: JSON.stringify(req.body),
})
.then(response => {
console.log('Response status:', response.status);
return response.json().then(data => ({ status: response.status, data }));
})
.then(({ status, data }) => {
console.log('Response data:', data);
res.status(status).json(data);
})
.catch(error => {
console.error('Error:', error);
res.status(500).json({ error: 'Internal Server Error' });
});
.then((response) => {
console.log('Response status:', response.status);
return response
.json()
.then((data) => ({ status: response.status, data }));
})
.then(({ status, data }) => {
console.log('Response data:', data);
res.status(status).json(data);
})
.catch((error) => {
console.error('Error:', error);
res.status(500).json({ error: 'Internal Server Error' });
});
} else {
res.setHeader('Allow', ['POST']);
res.status(405).end(`Method ${req.method} Not Allowed`);
}
}
}