diff --git a/src/routes/polling/+page.svelte b/src/routes/polling/+page.svelte
index 366815c..a7a45ec 100644
--- a/src/routes/polling/+page.svelte
+++ b/src/routes/polling/+page.svelte
@@ -128,14 +128,15 @@ function calc_selected_logo_ids(v) {
if (submit) {
return;
}
- selected = [];
+
+ logos.forEach((v => {
+ selected[v.name] = [];
+ }))
}
async function submitBallot() {
- // console.log(token);
- throw Error("This shit needs to be redone now hhhhhhh");
const data = {
- votes: logos.map((logo) => ({ cid: logo.id, vote: selected.includes(logo.id) }))
+ votes: logo_ids.map((id) => ({ cid: id, vote: selected_logo_ids.includes(id) }))
};
console.log(data);
@@ -197,7 +198,7 @@ function calc_selected_logo_ids(v) {
{#if selected[name].length != 0}