feat: A la signature d'un document, on récupère l'URL du PDF [#22]

This commit is contained in:
N3WT DE COMPET
2025-03-01 23:55:48 +01:00
parent eb81bbba92
commit 2ac4832985
8 changed files with 97 additions and 16 deletions

View File

@ -1,7 +1,8 @@
import { BE_SUBSCRIPTION_REGISTRATIONFILE_GROUPS_URL,
BE_SUBSCRIPTION_REGISTRATION_TEMPLATES_URL,
BE_SUBSCRIPTION_REGISTRATION_TEMPLATE_MASTER_URL,
FE_API_DOCUSEAL_CLONE_URL
FE_API_DOCUSEAL_CLONE_URL,
FE_API_DOCUSEAL_DOWNLOAD_URL
} from '@/utils/Url';
const requestResponseHandler = async (response) => {
@ -208,4 +209,14 @@ export const cloneTemplate = (templateId, email) => {
})
})
.then(requestResponseHandler)
}
export const downloadTemplate = (slug) => {
return fetch(`${FE_API_DOCUSEAL_DOWNLOAD_URL}/${slug}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
}
})
.then(requestResponseHandler)
}