Skip to content

Commit

Permalink
🚀 Update some last things for Kandidatencheck
Browse files Browse the repository at this point in the history
  • Loading branch information
jh0ker committed Aug 11, 2021
1 parent 2c63d8a commit 494785a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion handler/actionLocationCandidates.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const handleWahlkreis_ = async (chat, wahlkreisId) => {
return `${c.kandidatVorname} ${c.kandidatName}, ${c.kandidatPartei}`;
});

const moreUrl = `https://www1.wdr.de//kandidatencheck/2021/wdr-bundestagswahl/app/kandidatencheck144.html?wahlkreisid=${wahlkreis.id}`;
const moreUrl = `https://www1.wdr.de//kandidatencheck/2021/wdr-bundestagswahl/app/kandidatencheck144.html?wahlkreisid=${wahlkreis.id}&wt_mc=fb`;

const text = `In deinem Wahlkreis „${
wahlkreis.wahlkreisName
Expand All @@ -73,5 +73,8 @@ const handleWahlkreis_ = async (chat, wahlkreisId) => {
moreUrl
}`;

const imageUrl = 'https://images.informant.einslive.de/MicrosoftTeams-image-0fd5c975-6c55-4f78-a49d-4cdd6bc4109b.png';

await chat.sendAttachment(imageUrl);
return chat.sendText(text);
};
6 changes: 5 additions & 1 deletion lib/urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export default {
candidatesByWahlkreisId: (wahlkreisId) => {
const url = new URL(`${
process.env.KANDIDATENCHECK_EXPORT_BASE_URL || process.env.EXPORT_BASE_URL
}/getKandidatenByOrtWahlkreisOrPLZ/${wahlkreisId}`);
}/getKandidatenByWahlkreisIdForStructureNodePath/${wahlkreisId}`);
url.searchParams.append(
'structureNodePath',
'/wdr/kandidatencheck/2021/wdr-bundestagswahl/video'
);
return url.toString();
},
};

0 comments on commit 494785a

Please sign in to comment.