[BE] Point certificate's QR codes to new url: eegsac.com/certificado/<DNI>

This commit is contained in:
Araozu 2023-07-11 17:44:07 -05:00
parent e144178c27
commit 1eccc62056
2 changed files with 6 additions and 2 deletions

View File

@ -61,7 +61,9 @@ export async function getQR(data : {
verticalOffset: number, verticalOffset: number,
behindDocument?: boolean, behindDocument?: boolean,
}): Promise<ImageRun> { }): Promise<ImageRun> {
const qr = await QR.toDataURL(`https://www.eegsac.com/alumnoscertificados.php?DNI=${data.dni}&iid=${data.iid}`, {margin: 1}); // Old URL: https://www.eegsac.com/alumnoscertificados.php?DNI=${dni()}
// New URL: https://eegsac.com/certificado/${dni()}
const qr = await QR.toDataURL(`https://eegsac.com/certificado/${data.dni}?iid=${data.iid}`, {margin: 1});
return new ImageRun({ return new ImageRun({
data: qr, data: qr,

View File

@ -23,7 +23,9 @@ export function Search(props: {setPerson: (p: Person | null) => void}) {
// Update QR // Update QR
createEffect(() => { createEffect(() => {
if (dni() !== "") { if (dni() !== "") {
QR.toDataURL(`https://www.eegsac.com/alumnoscertificados.php?DNI=${dni()}`, {margin: 1}, (err, res) => { // Old URL: https://www.eegsac.com/alumnoscertificados.php?DNI=${dni()}
// New URL: https://eegsac.com/certificado/${dni()}
QR.toDataURL(`https://eegsac.com/certificado/${dni()}`, {margin: 1}, (err, res) => {
if (err) { if (err) {
console.error("Error creating QR code"); console.error("Error creating QR code");
return; return;