Remove token column from poll_voters table

As it is no longer used as originally pretended [1][2].

[1] Check consul/consul pull request 1994
[2] Check consul/consul pull request 3539
This commit is contained in:
Senén Rodero Rodríguez
2022-09-15 18:45:28 +02:00
committed by taitus
parent dd04765af3
commit 64676be246
16 changed files with 24 additions and 53 deletions

View File

@@ -1,28 +1,7 @@
(function() {
"use strict";
App.Polls = {
generateToken: function() {
var strings;
strings = Array.apply(null, {
length: 6
}).map(function() {
return Math.random().toString(36).substr(2); // remove `0.`
});
return strings.join("").substring(0, 64);
},
replaceToken: function(token) {
$(".js-question-answer").each(function() {
var token_param;
token_param = this.search.slice(-6);
if (token_param === "token=") {
this.href = this.href + token;
}
});
},
initialize: function() {
var token;
token = App.Polls.generateToken();
App.Polls.replaceToken(token);
$(".zoom-link").on("click", function(event) {
var answer;
answer = $(event.target).closest("div.answer");