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

@ -7,25 +7,27 @@ export default function handler(req, res) {
fetch(`${BE_DOCUSEAL_REMOVE_TEMPLATE}/${templateId}`, {
method: 'DELETE',
headers: {
'X-Auth-Token': process.env.DOCUSEAL_API_KEY
}
'X-Auth-Token': process.env.DOCUSEAL_API_KEY,
},
})
.then(response => {
if (!response.ok) {
return response.json().then(err => { throw new Error(err.message); });
}
return response.json();
})
.then(data => {
console.log('Template removed successfully:', data);
res.status(200).json(data);
})
.catch(error => {
console.error('Error removing template:', error);
res.status(500).json({ error: 'Internal Server Error' });
});
.then((response) => {
if (!response.ok) {
return response.json().then((err) => {
throw new Error(err.message);
});
}
return response.json();
})
.then((data) => {
console.log('Template removed successfully:', data);
res.status(200).json(data);
})
.catch((error) => {
console.error('Error removing template:', error);
res.status(500).json({ error: 'Internal Server Error' });
});
} else {
res.setHeader('Allow', ['DELETE']);
res.status(405).end(`Method ${req.method} Not Allowed`);
}
}
}