Document generation hotfix 🐞

This commit is contained in:
Nicolai Ort 2021-04-14 12:18:02 +02:00
parent 152e74190d
commit b74bea0340
2 changed files with 4 additions and 2 deletions

View File

@ -5,6 +5,8 @@ const config = {
baseurl: '', baseurl: '',
// optional, will fallback to /selfservice/ // optional, will fallback to /selfservice/
baseurl_selfservice: '/selfservice/', baseurl_selfservice: '/selfservice/',
// full url (including fqdn)
baseurl_documentserver: 'http://localhost:4010/documents',
// optional, will fallback to baseurl_selfservice/imprint // optional, will fallback to baseurl_selfservice/imprint
url_imprint: '', url_imprint: '',
// optional, will fallback to baseurl_selfservice/privacy // optional, will fallback to baseurl_selfservice/privacy

View File

@ -388,7 +388,7 @@ function delete_me() {
function get_certificate() { function get_certificate() {
toast("Generation in progress..."); toast("Generation in progress...");
const browserlocale = ((navigator.languages && navigator.languages[0]) || '').substr(0, 2); const browserlocale = ((navigator.languages && navigator.languages[0]) || '').substr(0, 2);
let url = `${config.baseurl}documents/certificates?locale=${browserlocale}&download=true&key=${config.documentserver_key}`; let url = `${config.baseurl_documentserver}certificates?locale=${browserlocale}&download=true&key=${config.documentserver_key}`;
let postdata = Object.assign({}, state.fullobject); let postdata = Object.assign({}, state.fullobject);
postdata.group = { postdata.group = {
name: postdata.group name: postdata.group
@ -416,7 +416,7 @@ function get_certificate() {
}) })
.catch((err) => { .catch((err) => {
console.error(err); console.error(err);
toast.error("An error occured while deleting your profile data"); toast.error("An error occured while generating your certificate");
}); });
} }
</script> </script>