Add a querystring option to disable the poll create success message
This commit is contained in:
parent
94daa6e4eb
commit
7632a7931d
2 changed files with 10 additions and 4 deletions
|
|
@ -76,8 +76,11 @@ let app = new Vue({
|
|||
methods: {
|
||||
async start_poll(poll_data) {
|
||||
try {
|
||||
let r = await axios.post("/twitch/alkali_metal/poll", poll_data);
|
||||
alert("Poll should've been created successfully.");
|
||||
await axios.post("/polls/twitch/alkali_metal/poll", poll_data);
|
||||
let qs = new URLSearchParams(window.location.search);
|
||||
if (!qs.has("no_alert")) {
|
||||
alert("Poll should've been created successfully.");
|
||||
};
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
alert("Something went wrong starting the poll, check to see if one is made already.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue