mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
feat: Utilisation d'une clef API Docuseal par établissement
This commit is contained in:
@ -3,13 +3,13 @@ import { BE_DOCUSEAL_DOWNLOAD_TEMPLATE } from '@/utils/Url';
|
||||
|
||||
export default function handler(req, res) {
|
||||
if (req.method === 'GET') {
|
||||
const { slug } = req.query;
|
||||
const { slug, establishment_id, apiDocuseal } = req.query;
|
||||
logger.debug('slug : ', slug);
|
||||
|
||||
fetch(`${BE_DOCUSEAL_DOWNLOAD_TEMPLATE}/${slug}`, {
|
||||
fetch(`${BE_DOCUSEAL_DOWNLOAD_TEMPLATE}/${slug}?establishment_id=${establishment_id}`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'X-Auth-Token': process.env.DOCUSEAL_API_KEY,
|
||||
'X-Auth-Token': apiDocuseal,
|
||||
},
|
||||
})
|
||||
.then((response) => {
|
||||
|
||||
Reference in New Issue
Block a user