add: polls

This commit is contained in:
trisua 2025-06-04 17:21:46 -04:00
parent 4dfa09207e
commit 6555324650
29 changed files with 339 additions and 56 deletions

View file

@ -179,6 +179,13 @@
e.preventDefault();
await trigger(\"atto::debounce\", [\"posts::create\"]);
// poll
const poll_data = get_poll_data();
if (!poll_data[0]) {
return alert(poll_data[1]);
}
// create body
const body = new FormData();
@ -194,6 +201,7 @@
content: e.target.content.value,
community: \"{{ config.town_square }}\",
answering,
poll: poll_data[1],
}),
);