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: {
|
methods: {
|
||||||
async start_poll(poll_data) {
|
async start_poll(poll_data) {
|
||||||
try {
|
try {
|
||||||
let r = await axios.post("/twitch/alkali_metal/poll", poll_data);
|
await axios.post("/polls/twitch/alkali_metal/poll", poll_data);
|
||||||
alert("Poll should've been created successfully.");
|
let qs = new URLSearchParams(window.location.search);
|
||||||
|
if (!qs.has("no_alert")) {
|
||||||
|
alert("Poll should've been created successfully.");
|
||||||
|
};
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
alert("Something went wrong starting the poll, check to see if one is made already.")
|
alert("Something went wrong starting the poll, check to see if one is made already.")
|
||||||
|
|
|
||||||
|
|
@ -76,8 +76,11 @@ let app = new Vue({
|
||||||
methods: {
|
methods: {
|
||||||
async start_poll(poll_data) {
|
async start_poll(poll_data) {
|
||||||
try {
|
try {
|
||||||
let r = await axios.post("/polls/twitch/czechgamesedition/poll", poll_data);
|
await axios.post("/polls/twitch/czechgamesedition/poll", poll_data);
|
||||||
alert("Poll should've been created successfully.");
|
let qs = new URLSearchParams(window.location.search);
|
||||||
|
if (!qs.has("no_alert")) {
|
||||||
|
alert("Poll should've been created successfully.");
|
||||||
|
};
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
alert("Something went wrong starting the poll, check to see if one is made already.")
|
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