2019-12-03 17:20:57 +01:00
|
|
|
import {Injectable} from '@angular/core';
|
|
|
|
import {PollConfig} from '../config/PollConfig';
|
2020-04-11 16:59:46 +02:00
|
|
|
import {HttpClient} from '@angular/common/http';
|
|
|
|
import {environment} from '../../environments/environment';
|
2020-01-16 14:37:11 +01:00
|
|
|
import {ConfirmationService, MessageService} from 'primeng/api';
|
2020-04-11 16:59:46 +02:00
|
|
|
import {Router} from '@angular/router';
|
|
|
|
import {mockMyPolls} from '../config/mocks/mockmypolls';
|
|
|
|
import {mockPoll3} from '../config/mocks/mock-poll3';
|
|
|
|
import {mockSuccessVote} from '../config/mocks/mock-success-vote';
|
|
|
|
import {PollUtilities} from '../config/PollUtilities';
|
|
|
|
|
|
|
|
const LocalstoragePreferences = {
|
2020-04-11 17:07:38 +02:00
|
|
|
themeName: 'light-watermelon',
|
|
|
|
themeClass: 'theme-light-watermelon',
|
|
|
|
lang: 'fr',
|
2020-04-13 10:59:25 +02:00
|
|
|
myPolls: [],
|
2020-04-11 16:59:46 +02:00
|
|
|
};
|
2019-12-03 17:20:57 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* le service transverse à chaque page qui permet de syncroniser la configuration de sondage souhaitée
|
|
|
|
*/
|
|
|
|
@Injectable({
|
|
|
|
providedIn: 'root'
|
|
|
|
})
|
|
|
|
export class ConfigService extends PollConfig {
|
2020-01-16 11:46:31 +01:00
|
|
|
|
2020-04-11 16:59:46 +02:00
|
|
|
|
|
|
|
preferences: any = LocalstoragePreferences; // user specific preferences, stored in localstorage, used for theme.
|
|
|
|
loading = false;
|
2019-12-03 17:20:57 +01:00
|
|
|
baseHref: any = environment.baseApiHref;
|
|
|
|
|
|
|
|
|
2020-01-15 15:55:15 +01:00
|
|
|
constructor(private http: HttpClient,
|
2020-01-16 14:37:11 +01:00
|
|
|
private messageService: MessageService,
|
|
|
|
private router: Router,
|
2020-02-05 11:13:36 +01:00
|
|
|
private utils: PollUtilities,
|
2020-01-16 14:37:11 +01:00
|
|
|
private confirmationService: ConfirmationService,
|
|
|
|
) {
|
2019-12-03 17:20:57 +01:00
|
|
|
super();
|
2020-02-05 11:13:36 +01:00
|
|
|
this.fillValuesOnDevEnv();
|
2020-04-11 16:59:46 +02:00
|
|
|
this.findLocalStoragePreferences();
|
2019-12-03 17:20:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
set(key, val) {
|
|
|
|
this[key] = val;
|
|
|
|
}
|
|
|
|
|
2020-02-05 11:13:36 +01:00
|
|
|
// fill in mock values if we are not in production environment
|
|
|
|
fillValuesOnDevEnv() {
|
2020-01-15 15:55:15 +01:00
|
|
|
|
2020-02-05 11:13:36 +01:00
|
|
|
if (!environment.production) {
|
|
|
|
console.info(' ######### framadate ######### we are not in production env, filling with mock values');
|
|
|
|
this.currentPoll = mockPoll3;
|
|
|
|
this.myPolls = mockMyPolls;
|
2020-01-16 11:33:13 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-11 16:59:46 +02:00
|
|
|
findLocalStoragePreferences() {
|
|
|
|
const storage = window.localStorage;
|
|
|
|
console.log('this.preferences', this.preferences);
|
|
|
|
console.log('storage', storage);
|
|
|
|
|
|
|
|
if (storage) {
|
|
|
|
const preferences = storage.getItem('FramadateConfig');
|
|
|
|
|
2020-04-11 17:23:52 +02:00
|
|
|
if (preferences) {
|
2020-04-11 16:59:46 +02:00
|
|
|
|
2020-04-11 17:23:52 +02:00
|
|
|
const parsed = JSON.parse(preferences);
|
|
|
|
console.log('parsed', parsed);
|
|
|
|
this.preferences = parsed;
|
2020-04-11 16:59:46 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
console.error('pas de localstorage');
|
|
|
|
this.preferences = LocalstoragePreferences;
|
|
|
|
}
|
|
|
|
this.saveLocalStoragePreferences();
|
|
|
|
}
|
|
|
|
|
|
|
|
setPreference(key, value) {
|
|
|
|
|
|
|
|
if (this.preferences) {
|
|
|
|
|
|
|
|
this.preferences[key] = value;
|
2020-04-11 17:23:52 +02:00
|
|
|
if (key === 'themeName' && this.themeChoices.includes(value)) {
|
2020-04-11 16:59:46 +02:00
|
|
|
this.themeSelected = this.themeChoices.indexOf(value);
|
|
|
|
this.preferences.themeClass =
|
|
|
|
this.themeClass = `theme-${value}`;
|
|
|
|
}
|
|
|
|
this.saveLocalStoragePreferences();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
saveLocalStoragePreferences() {
|
|
|
|
const storage = window.localStorage;
|
|
|
|
if (storage) {
|
|
|
|
const preferences = storage.setItem('FramadateConfig', JSON.stringify(this.preferences));
|
|
|
|
} else {
|
|
|
|
console.error('pas de localstorage');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-01-16 11:33:13 +01:00
|
|
|
/**
|
|
|
|
* add some days to a date, to compute intervals
|
|
|
|
* @param days
|
|
|
|
* @param date
|
|
|
|
*/
|
|
|
|
addDaysToDate(days: number, date: Date) {
|
|
|
|
date = new Date(date.valueOf());
|
|
|
|
date.setDate(date.getDate() + days);
|
|
|
|
return date;
|
|
|
|
};
|
|
|
|
|
2019-12-04 12:45:50 +01:00
|
|
|
/** ==================================
|
|
|
|
*
|
|
|
|
* poll public calls to get non authenticated info
|
|
|
|
*
|
|
|
|
* ==================================/
|
|
|
|
/**
|
|
|
|
* convert current poll config to a payload to send to the backend API
|
|
|
|
*/
|
2019-12-03 17:20:57 +01:00
|
|
|
getPollConfig() {
|
|
|
|
const jsonConfig = {
|
2020-01-22 14:42:46 +01:00
|
|
|
owner: {
|
|
|
|
email: this.myEmail,
|
|
|
|
pseudo: this.myName,
|
|
|
|
},
|
|
|
|
title: this.title,
|
|
|
|
description: this.description,
|
2020-01-23 17:36:56 +01:00
|
|
|
pollType: this.pollType,
|
2020-01-22 14:42:46 +01:00
|
|
|
visibility: this.visibility,
|
|
|
|
voteChoices: this.voteChoices,
|
|
|
|
allowSeveralHours: this.allowSeveralHours,
|
|
|
|
expirationDate: this.expirationDate,
|
|
|
|
passwordAccess: this.passwordAccess,
|
|
|
|
password: this.password,
|
|
|
|
customUrl: this.customUrl,
|
|
|
|
canModifyAnswers: this.canModifyAnswers,
|
|
|
|
whoModifiesAnswers: this.whoModifiesAnswers,
|
|
|
|
dateList: this.dateList,
|
|
|
|
timeList: this.timeList,
|
|
|
|
answers: this.answers,
|
2020-01-22 16:49:15 +01:00
|
|
|
expiracyDateDefaultInDays: this.expiracyDateDefaultInDays,
|
|
|
|
deletionDateAfterLastModification: this.deletionDateAfterLastModification,
|
2019-12-03 17:20:57 +01:00
|
|
|
};
|
2020-04-11 16:59:46 +02:00
|
|
|
return jsonConfig;
|
2019-12-03 17:20:57 +01:00
|
|
|
}
|
|
|
|
|
2020-01-15 15:55:15 +01:00
|
|
|
|
2020-01-22 11:18:55 +01:00
|
|
|
checkIfSlugIsUniqueInDatabase(slug: string = '') {
|
2020-01-16 11:33:13 +01:00
|
|
|
this.customUrlIsUnique = null;
|
2020-01-22 11:18:55 +01:00
|
|
|
if (!slug) {
|
2020-02-05 11:13:36 +01:00
|
|
|
slug = this.utils.makeSlug(this);
|
2020-01-22 11:18:55 +01:00
|
|
|
}
|
2020-01-16 11:33:13 +01:00
|
|
|
|
|
|
|
this.loading = true;
|
2020-01-21 12:04:14 +01:00
|
|
|
// TODO
|
|
|
|
this.todo('check slug is unique');
|
2020-01-22 11:18:55 +01:00
|
|
|
this.http.get(`${this.baseHref}/check-slug-is-uniq/${slug}`,
|
2020-02-05 11:13:36 +01:00
|
|
|
this.utils.makeHeaders({slug: this.customUrl}),
|
2020-01-16 11:33:13 +01:00
|
|
|
)
|
|
|
|
.subscribe((res: any) => {
|
|
|
|
|
2020-01-24 12:11:28 +01:00
|
|
|
this.customUrlIsUnique = res.poll.isUnique;
|
2020-01-16 11:33:13 +01:00
|
|
|
this.loading = false;
|
|
|
|
},
|
|
|
|
(e) => this.handleError(e))
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
2019-12-04 12:45:50 +01:00
|
|
|
/**
|
|
|
|
* search in localstorage, fallback asking the backend to send an email to the owner if it exists
|
|
|
|
* @param email
|
|
|
|
*/
|
|
|
|
findPollsByEmail(email: string) {
|
|
|
|
|
|
|
|
this.findLocalStorageData();
|
|
|
|
// If no key is found in the localstorage, ask the backend to send an email to the user
|
|
|
|
|
|
|
|
this.myEmail = email;
|
|
|
|
|
|
|
|
|
2020-01-22 16:49:15 +01:00
|
|
|
this.todo('send email for real : TODO');
|
2020-01-15 11:40:39 +01:00
|
|
|
this.loading = true;
|
2020-01-22 16:05:37 +01:00
|
|
|
this.http.get(`${this.baseHref}/send-polls-to-user/${this.myEmail}`,
|
2020-02-05 11:13:36 +01:00
|
|
|
this.utils.makeHeaders(),
|
2020-01-15 11:40:39 +01:00
|
|
|
)
|
2019-12-04 12:45:50 +01:00
|
|
|
.subscribe(res => {
|
|
|
|
// message: 'Trouvé! Allez voir votre boite email',
|
2020-01-16 12:05:54 +01:00
|
|
|
this.myPolls = res;
|
|
|
|
this.loading = false;
|
2020-01-15 15:55:15 +01:00
|
|
|
this.messageService.add({
|
|
|
|
severity: 'success',
|
2020-01-22 16:05:37 +01:00
|
|
|
summary: 'Succès',
|
|
|
|
detail: `Vos infos de sondages vous ont été transmises. Allez voir votre boite email ${this.myEmail}`
|
2020-01-15 15:55:15 +01:00
|
|
|
});
|
|
|
|
}, (e) => {
|
2020-04-11 16:59:46 +02:00
|
|
|
this.handleError(e);
|
2020-01-15 15:55:15 +01:00
|
|
|
}
|
2020-04-11 16:59:46 +02:00
|
|
|
);
|
2019-12-04 12:45:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* display error message depending on the response of the backend
|
|
|
|
* @param err
|
|
|
|
*/
|
2019-12-03 17:20:57 +01:00
|
|
|
handleError(err: any) {
|
2020-01-15 15:55:15 +01:00
|
|
|
console.error('err', err);
|
2020-01-15 11:40:39 +01:00
|
|
|
this.loading = false;
|
2020-04-11 16:59:46 +02:00
|
|
|
this.messageService.add({severity: 'warning', summary: 'Erreur lors de l\'appel ', detail: err.message});
|
2019-12-03 17:20:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
findLocalStorageData() {
|
|
|
|
// TODO check if the person has a key to retrieve her polls
|
2020-01-20 16:03:12 +01:00
|
|
|
console.log('localStorage', localStorage);
|
2020-01-16 14:37:11 +01:00
|
|
|
if (localStorage) {
|
2020-04-11 16:59:46 +02:00
|
|
|
console.log('localStorage', localStorage);
|
2020-01-16 14:37:11 +01:00
|
|
|
}
|
2019-12-03 17:20:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2020-01-15 15:55:15 +01:00
|
|
|
* get one poll by its slug name
|
2019-12-03 17:20:57 +01:00
|
|
|
* @param url
|
|
|
|
*/
|
|
|
|
getPollByURL(url: string) {
|
2020-01-21 12:04:14 +01:00
|
|
|
|
|
|
|
this.todo();
|
2020-04-11 16:59:46 +02:00
|
|
|
return this.http.get(`${this.baseHref}/poll/slug/${url}`, this.utils.makeHeaders());
|
2019-12-03 17:20:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2019-12-04 12:45:50 +01:00
|
|
|
* GET
|
|
|
|
* api/v1/poll/{id}
|
2019-12-03 17:20:57 +01:00
|
|
|
* @param id
|
|
|
|
*/
|
2020-01-20 15:50:09 +01:00
|
|
|
getPollById(id: string, password?: string) {
|
2020-01-15 11:40:39 +01:00
|
|
|
|
2020-01-20 15:50:09 +01:00
|
|
|
return this.http
|
2019-12-04 12:45:50 +01:00
|
|
|
.get(`${this.baseHref}/poll/${id}`,
|
2020-04-11 16:59:46 +02:00
|
|
|
this.utils.makeHeaders({body: password}));
|
2020-01-23 14:23:07 +01:00
|
|
|
}
|
2020-01-20 15:50:09 +01:00
|
|
|
|
2020-01-23 14:23:07 +01:00
|
|
|
fetchPollFromRoute(event) {
|
2020-04-11 16:59:46 +02:00
|
|
|
console.log('time to fetch poll', event);
|
2019-12-04 12:45:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GET
|
|
|
|
* api/v1/my-polls
|
|
|
|
* @param ownerEmail
|
|
|
|
*/
|
|
|
|
getMyPolls(ownerEmail: string) {
|
|
|
|
this.http
|
|
|
|
.get(`${this.baseHref}/my-polls`,
|
2020-04-11 16:59:46 +02:00
|
|
|
this.utils.makeHeaders({ownerEmail})
|
2020-01-15 15:55:15 +01:00
|
|
|
)
|
2019-12-04 12:45:50 +01:00
|
|
|
.subscribe(
|
|
|
|
(res: any) => {
|
2020-01-24 12:11:28 +01:00
|
|
|
// this.myPolls = res.poll;
|
2020-01-15 15:55:15 +01:00
|
|
|
}, (e) => {
|
2020-04-11 16:59:46 +02:00
|
|
|
this.handleError(e);
|
2020-01-15 15:55:15 +01:00
|
|
|
}
|
2019-12-04 12:45:50 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2020-01-20 15:23:26 +01:00
|
|
|
* launch creation call to the api
|
2019-12-04 12:45:50 +01:00
|
|
|
*/
|
|
|
|
createPoll() {
|
2020-01-20 15:23:26 +01:00
|
|
|
this.loading = true;
|
2020-04-11 16:59:46 +02:00
|
|
|
this.createPollFromConfig(this.getPollConfig());
|
2019-12-04 12:45:50 +01:00
|
|
|
}
|
|
|
|
|
2020-01-24 11:10:50 +01:00
|
|
|
updateCurrentPollFromResponse(res: any) {
|
2020-01-29 16:30:07 +01:00
|
|
|
console.log('update res', res);
|
|
|
|
this.currentPoll = res;
|
2020-01-24 12:11:28 +01:00
|
|
|
this.pollId = res.poll.id;
|
2020-02-04 12:51:18 +01:00
|
|
|
this.owner_modifier_token = res.owner_modifier_token;
|
2020-01-24 12:11:28 +01:00
|
|
|
this.urlPublic = this.baseHref + '#/vote/poll/id/' + res.poll.id;
|
|
|
|
this.urlSlugPublic = this.baseHref + '#/vote/poll/slug/' + res.poll.id;
|
|
|
|
if (res.poll.customUrl) {
|
|
|
|
this.urlSlugPublic = this.baseHref + '#/vote/poll/id/' + res.poll.customUrl;
|
2020-01-24 11:10:50 +01:00
|
|
|
}
|
2020-04-02 17:59:33 +02:00
|
|
|
if (res.vote_stack) {
|
|
|
|
this.loadVoteStack(res.vote_stack);
|
2020-02-04 12:51:18 +01:00
|
|
|
}
|
2020-02-04 11:35:29 +01:00
|
|
|
this.adminKey = res.admin_key;
|
2020-01-24 11:10:50 +01:00
|
|
|
this.urlAdmin = this.baseHref + '#/admin/' + res.admin_key;
|
|
|
|
}
|
|
|
|
|
2020-02-04 14:28:43 +01:00
|
|
|
resetCurrentChoicesAnswers() {
|
|
|
|
this.currentPoll.choices.map(choice => {
|
|
|
|
choice.answer = null;
|
2020-04-11 16:59:46 +02:00
|
|
|
});
|
2020-02-04 14:28:43 +01:00
|
|
|
}
|
|
|
|
|
2020-01-30 10:07:03 +01:00
|
|
|
/**
|
|
|
|
* update current answers with a previous vote
|
|
|
|
* @param voteStack
|
|
|
|
*/
|
|
|
|
loadVoteStack(voteStack: any) {
|
|
|
|
|
|
|
|
// load the pseudo and email
|
|
|
|
this.myName = voteStack.pseudo;
|
2020-02-04 12:51:18 +01:00
|
|
|
this.myEmail = voteStack.email;
|
2020-01-30 10:07:03 +01:00
|
|
|
this.voteStackId = voteStack.id;
|
|
|
|
this.myVoteStack = voteStack;
|
2020-04-11 16:59:46 +02:00
|
|
|
const keys = Object.keys(voteStack.votes);
|
2020-02-04 12:51:18 +01:00
|
|
|
console.log('voteStack', voteStack);
|
2020-02-04 14:28:43 +01:00
|
|
|
this.resetCurrentChoicesAnswers();
|
2020-02-04 12:51:18 +01:00
|
|
|
keys.forEach((id: any) => {
|
2020-04-11 16:59:46 +02:00
|
|
|
const voteItem = voteStack.votes[id];
|
2020-02-04 12:51:18 +01:00
|
|
|
/**
|
|
|
|
* the display of the poll uses the choices data, so we update the choices answers of the current poll to reflect the vote stack we have taken
|
|
|
|
*/
|
2020-01-30 10:07:03 +01:00
|
|
|
if (voteItem.choice_id && voteItem.value) {
|
2020-04-11 16:59:46 +02:00
|
|
|
const foundChoiceToModify = this.currentPoll.choices.find(choicesItem => {
|
|
|
|
return voteItem.choice_id == choicesItem.id;
|
2020-01-30 10:07:03 +01:00
|
|
|
});
|
2020-02-05 11:13:36 +01:00
|
|
|
console.log('foundChoiceToModify', foundChoiceToModify);
|
2020-01-30 10:07:03 +01:00
|
|
|
if (foundChoiceToModify) {
|
|
|
|
foundChoiceToModify.answer = voteItem.value;
|
|
|
|
}
|
|
|
|
}
|
2020-04-11 16:59:46 +02:00
|
|
|
});
|
2020-01-30 10:07:03 +01:00
|
|
|
}
|
|
|
|
|
2019-12-04 12:45:50 +01:00
|
|
|
/**
|
|
|
|
* POST
|
|
|
|
* /api/v1/poll/{id}/poll
|
|
|
|
* @param config
|
|
|
|
*/
|
|
|
|
createPollFromConfig(config: any) {
|
2020-01-20 15:50:09 +01:00
|
|
|
this.loading = true;
|
2020-01-30 10:07:03 +01:00
|
|
|
console.log('config', config);
|
2020-01-20 15:23:26 +01:00
|
|
|
return this.http.post(`${this.baseHref}/poll`,
|
2020-01-22 16:05:37 +01:00
|
|
|
config,
|
2020-02-05 11:13:36 +01:00
|
|
|
this.utils.makeHeaders())
|
2019-12-04 12:45:50 +01:00
|
|
|
.subscribe((res: any) => {
|
|
|
|
// redirect to the page to administrate the new poll
|
2020-01-15 15:55:15 +01:00
|
|
|
this.messageService.add({severity: 'success', summary: 'Sondage Créé',});
|
2020-01-24 11:10:50 +01:00
|
|
|
|
|
|
|
this.updateCurrentPollFromResponse(res);
|
|
|
|
|
2020-01-20 15:23:26 +01:00
|
|
|
this.loading = false;
|
2020-01-22 16:49:15 +01:00
|
|
|
if (!this.myPolls) {
|
|
|
|
this.myPolls = [];
|
|
|
|
}
|
2020-01-23 15:08:52 +01:00
|
|
|
this.myPolls.push(res);
|
2020-01-20 15:23:26 +01:00
|
|
|
this.router.navigate(['step/end']);
|
2020-01-22 11:18:55 +01:00
|
|
|
// TODO save new poll to localstorage
|
|
|
|
// reset all fields in current config
|
|
|
|
this.resetConfig();
|
2020-01-15 15:55:15 +01:00
|
|
|
}, (e) => {
|
2020-04-11 16:59:46 +02:00
|
|
|
this.handleError(e);
|
2020-01-15 15:55:15 +01:00
|
|
|
}
|
2019-12-04 12:45:50 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2020-01-23 11:16:55 +01:00
|
|
|
/**
|
|
|
|
* conversion to send to back
|
|
|
|
* @param choiceList
|
|
|
|
*/
|
|
|
|
convertChoicesAnsweredToSend(choiceList) {
|
2020-01-30 11:19:17 +01:00
|
|
|
choiceList = choiceList.filter(c => c.answer ? c : null); // remove choices where we did not answer
|
2020-01-23 11:16:55 +01:00
|
|
|
const converted = choiceList.map(elem => {
|
2020-01-30 11:19:17 +01:00
|
|
|
if (elem.answer) {
|
|
|
|
return {
|
|
|
|
choice_id: elem.id,
|
|
|
|
value: elem.answer
|
2020-04-11 16:59:46 +02:00
|
|
|
};
|
2020-01-23 11:16:55 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
console.log('converted', converted);
|
|
|
|
return converted;
|
|
|
|
}
|
2019-12-04 12:45:50 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* POST
|
|
|
|
* /api/v1/poll/{id}/vote
|
|
|
|
* @param voteStack
|
|
|
|
*/
|
2020-01-16 15:35:11 +01:00
|
|
|
addVote(voteStack?: any) {
|
|
|
|
if (!voteStack) {
|
|
|
|
voteStack = {
|
|
|
|
pseudo: this.myName,
|
2020-01-22 16:49:15 +01:00
|
|
|
email: this.myEmail,
|
2020-01-23 11:16:55 +01:00
|
|
|
votes: this.convertChoicesAnsweredToSend(this.currentPoll.choices),
|
2020-04-11 16:59:46 +02:00
|
|
|
};
|
2020-01-16 15:35:11 +01:00
|
|
|
}
|
2020-01-23 15:08:52 +01:00
|
|
|
this.myVoteStack = voteStack;
|
|
|
|
|
2020-01-30 11:19:17 +01:00
|
|
|
if (!environment.production) {
|
|
|
|
this.handleVoteAdded(mockSuccessVote);
|
|
|
|
return;
|
|
|
|
}
|
2020-01-15 15:55:15 +01:00
|
|
|
this.http.post(
|
2020-01-23 15:08:52 +01:00
|
|
|
`${this.baseHref}/poll/${this.pollId}/vote`,
|
2020-01-15 15:55:15 +01:00
|
|
|
voteStack,
|
2020-02-05 11:13:36 +01:00
|
|
|
this.utils.makeHeaders())
|
2019-12-04 12:45:50 +01:00
|
|
|
.subscribe((res: any) => {
|
|
|
|
|
2020-01-30 11:19:17 +01:00
|
|
|
this.handleVoteAdded(res);
|
2020-01-15 15:55:15 +01:00
|
|
|
}, (e) => {
|
2020-04-11 16:59:46 +02:00
|
|
|
this.handleError(e);
|
2020-01-15 15:55:15 +01:00
|
|
|
}
|
2019-12-04 12:45:50 +01:00
|
|
|
);
|
2019-12-03 17:20:57 +01:00
|
|
|
}
|
|
|
|
|
2020-01-30 11:19:17 +01:00
|
|
|
handleVoteAdded(res) {
|
2020-04-02 17:49:10 +02:00
|
|
|
if (this.isAdmin) {
|
|
|
|
this.displayConfirmVoteModalAdmin = true;
|
|
|
|
}
|
2020-01-30 11:19:17 +01:00
|
|
|
// save modifier token
|
2020-04-11 16:59:46 +02:00
|
|
|
this.myVoteStack.modifier_token = res.modifier_token;
|
|
|
|
this.myVoteStack.id = res.vote_stack.id;
|
2020-01-30 11:19:17 +01:00
|
|
|
this.updateCurrentPollFromResponse(res);
|
|
|
|
}
|
|
|
|
|
2019-12-04 12:45:50 +01:00
|
|
|
/**
|
|
|
|
* UPDATE
|
|
|
|
* /api/v1/poll/{id}/vote
|
|
|
|
* @param voteStack
|
|
|
|
*/
|
2020-01-23 15:08:52 +01:00
|
|
|
updateVote(voteStack?: any) {
|
|
|
|
if (!this.myVoteStack) {
|
|
|
|
return;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
voteStack = this.myVoteStack;
|
|
|
|
}
|
2020-02-04 12:51:18 +01:00
|
|
|
this.http.patch(
|
|
|
|
`${this.baseHref}/vote-stack/${voteStack.id}/token/${this.owner_modifier_token}`,
|
2020-01-15 15:55:15 +01:00
|
|
|
voteStack,
|
2020-02-05 11:13:36 +01:00
|
|
|
this.utils.makeHeaders())
|
2019-12-04 12:45:50 +01:00
|
|
|
.subscribe((res: any) => {
|
2020-01-15 15:55:15 +01:00
|
|
|
this.messageService.add({severity: 'success', summary: 'Vote mis à jour'});
|
2020-01-24 11:10:50 +01:00
|
|
|
this.updateCurrentPollFromResponse(res);
|
2020-01-15 15:55:15 +01:00
|
|
|
}, (e) => {
|
2020-04-11 16:59:46 +02:00
|
|
|
this.handleError(e);
|
2020-01-15 15:55:15 +01:00
|
|
|
}
|
2019-12-04 12:45:50 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* POST
|
|
|
|
* /api/v1/poll/{id}/comment
|
|
|
|
* @param comment
|
|
|
|
*/
|
2020-01-16 15:35:11 +01:00
|
|
|
addComment(comment?: any) {
|
2020-01-20 15:58:35 +01:00
|
|
|
if (!comment && this.myComment) {
|
2020-01-16 15:35:11 +01:00
|
|
|
comment = {
|
2020-01-20 15:58:35 +01:00
|
|
|
name: this.myName,
|
2020-01-22 16:58:38 +01:00
|
|
|
pseudo: this.myName,
|
2020-01-22 16:05:37 +01:00
|
|
|
email: this.myEmail,
|
2020-01-20 15:58:35 +01:00
|
|
|
date: new Date(),
|
|
|
|
text: this.myComment,
|
2020-04-11 16:59:46 +02:00
|
|
|
};
|
2020-01-16 15:35:11 +01:00
|
|
|
}
|
2020-01-30 10:07:03 +01:00
|
|
|
console.log('comment', comment);
|
2020-01-15 15:55:15 +01:00
|
|
|
this.http.post(
|
2020-01-23 14:23:07 +01:00
|
|
|
`${this.baseHref}/poll/${this.pollId}/comment`,
|
2020-01-15 15:55:15 +01:00
|
|
|
comment,
|
2020-02-05 11:13:36 +01:00
|
|
|
this.utils.makeHeaders())
|
2019-12-04 12:45:50 +01:00
|
|
|
.subscribe((res: any) => {
|
2020-01-30 11:19:17 +01:00
|
|
|
this.messageService.add({
|
|
|
|
severity: 'success',
|
|
|
|
summary: 'Commentaire Créé',
|
|
|
|
detail: comment.text
|
|
|
|
});
|
2020-01-16 15:35:11 +01:00
|
|
|
// empty comment after success
|
|
|
|
this.myComment = '';
|
2020-01-22 16:58:38 +01:00
|
|
|
comment.date = {
|
|
|
|
date: comment.date
|
|
|
|
};
|
2020-01-20 15:58:35 +01:00
|
|
|
this.currentPoll.comments.push(comment);
|
2020-01-15 15:55:15 +01:00
|
|
|
}, (e) => {
|
2020-01-20 15:58:35 +01:00
|
|
|
this.handleError(e);
|
2020-01-15 15:55:15 +01:00
|
|
|
}
|
2019-12-04 12:45:50 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* administrator calls
|
|
|
|
*/
|
|
|
|
|
2020-01-16 14:37:11 +01:00
|
|
|
deleteComments() {
|
|
|
|
// prompt for confirmation
|
|
|
|
this.confirmationService.confirm({
|
|
|
|
message: 'Are you sure that you want to completely delete the comments of this poll (' + this.title + ') permanentely?',
|
|
|
|
accept: () => {
|
|
|
|
this.http.delete(
|
|
|
|
`${this.baseHref}/poll/${this.pollId}/comments`,
|
2020-02-05 11:13:36 +01:00
|
|
|
this.utils.makeHeaders())
|
2020-01-16 14:37:11 +01:00
|
|
|
.subscribe((res: any) => {
|
|
|
|
this.messageService.add({
|
|
|
|
severity: 'success',
|
|
|
|
summary: 'Commentaires bien supprimés',
|
|
|
|
detail: 'Commentaires du sondage "' + this.title + '" supprimé'
|
|
|
|
});
|
|
|
|
|
|
|
|
}, (e) => {
|
2020-04-11 16:59:46 +02:00
|
|
|
this.handleError(e);
|
2020-01-16 14:37:11 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
deleteVotes() {
|
2020-01-22 11:18:55 +01:00
|
|
|
// prompt for confirmation
|
2020-01-16 14:37:11 +01:00
|
|
|
this.confirmationService.confirm({
|
|
|
|
message: 'Are you sure that you want to completely delete the votes of this poll (' + this.title + ') permanentely?',
|
|
|
|
accept: () => {
|
|
|
|
this.http.delete(
|
|
|
|
`${this.baseHref}/poll/${this.pollId}/votes`,
|
2020-02-05 11:13:36 +01:00
|
|
|
this.utils.makeHeaders())
|
2020-01-16 14:37:11 +01:00
|
|
|
.subscribe((res: any) => {
|
|
|
|
this.messageService.add({
|
|
|
|
severity: 'success',
|
|
|
|
summary: 'Votes bien supprimés',
|
|
|
|
detail: 'Votes du sondage "' + this.title + '" supprimé'
|
|
|
|
});
|
|
|
|
|
|
|
|
}, (e) => {
|
2020-04-11 16:59:46 +02:00
|
|
|
this.handleError(e);
|
2020-01-16 14:37:11 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
deletePoll() {
|
|
|
|
if (!this.pollId) {
|
|
|
|
this.messageService.add({
|
|
|
|
summary: 'this poll is not administrable, it has no ID',
|
|
|
|
severity: 'warning'
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
}
|
2020-04-11 16:59:46 +02:00
|
|
|
const self = this;
|
2020-01-16 14:37:11 +01:00
|
|
|
// prompt for confirmation
|
|
|
|
this.confirmationService.confirm({
|
|
|
|
message: 'Are you sure that you want to completely delete this poll (' + self.title + ') and all is data permanentely?',
|
|
|
|
accept: () => {
|
|
|
|
this.http.delete(
|
|
|
|
`${this.baseHref}/poll/${this.pollId}`,
|
2020-02-05 11:13:36 +01:00
|
|
|
this.utils.makeHeaders())
|
2020-01-16 14:37:11 +01:00
|
|
|
.subscribe((res: any) => {
|
|
|
|
this.messageService.add({
|
|
|
|
severity: 'success',
|
|
|
|
summary: 'Sondage bien supprimé',
|
|
|
|
detail: 'sondage "' + this.title + '" supprimé'
|
|
|
|
});
|
|
|
|
|
|
|
|
this.router.navigate(['home']);
|
|
|
|
}, (e) => {
|
2020-04-11 16:59:46 +02:00
|
|
|
this.handleError(e);
|
2020-01-16 14:37:11 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* UPDATE
|
|
|
|
* /api/v1/poll/{id}/vote
|
|
|
|
* @param voteStack
|
2020-01-29 16:30:07 +01:00
|
|
|
* TODO
|
2020-01-16 14:37:11 +01:00
|
|
|
*/
|
|
|
|
updatePoll(voteStack: any) {
|
|
|
|
this.http.put(
|
|
|
|
`${this.baseHref}/poll/${this.pollId}`,
|
|
|
|
voteStack,
|
2020-02-05 11:13:36 +01:00
|
|
|
this.utils.makeHeaders()
|
2020-01-16 14:37:11 +01:00
|
|
|
)
|
|
|
|
.subscribe((res: any) => {
|
|
|
|
this.messageService.add({
|
|
|
|
severity: 'success',
|
|
|
|
summary: 'Sondage mis à jour',
|
|
|
|
});
|
2020-01-24 12:11:28 +01:00
|
|
|
this.updateCurrentPollFromResponse(res);
|
2020-01-16 14:37:11 +01:00
|
|
|
}, (e) => {
|
2020-04-11 16:59:46 +02:00
|
|
|
this.handleError(e);
|
2020-01-16 14:37:11 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
2020-01-16 15:35:11 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* export all the poll data available to the public as a CSV single file
|
|
|
|
*/
|
|
|
|
exportCSV() {
|
|
|
|
|
2020-01-29 16:30:07 +01:00
|
|
|
|
2020-02-04 15:23:46 +01:00
|
|
|
let rows = [];
|
2020-04-11 16:59:46 +02:00
|
|
|
const now = new Date();
|
2020-02-04 15:23:46 +01:00
|
|
|
const headers = [
|
|
|
|
['export de sondage Framadate ', this.customUrl],
|
|
|
|
['le', now.toISOString()],
|
|
|
|
[this.currentPoll.pollId, this.currentPoll.title, this.customUrl, this.creationDate],
|
|
|
|
['pseudo']];
|
|
|
|
|
|
|
|
|
2020-04-11 16:59:46 +02:00
|
|
|
const listOfChoices = ['choices : '];
|
2020-02-04 15:23:46 +01:00
|
|
|
this.currentPoll.choices.map(choice => {
|
2020-04-11 16:59:46 +02:00
|
|
|
listOfChoices.push(choice.text);
|
2020-02-04 15:23:46 +01:00
|
|
|
});
|
|
|
|
listOfChoices.push('pseudo');
|
|
|
|
|
|
|
|
this.currentPoll.stacks.map(voteStack => {
|
2020-04-11 16:59:46 +02:00
|
|
|
const voteStackInArray = [voteStack.pseudo];
|
|
|
|
const keysVotes = Object.keys(voteStack.votes);
|
2020-02-04 15:23:46 +01:00
|
|
|
|
|
|
|
keysVotes.map(id => {
|
2020-04-11 16:59:46 +02:00
|
|
|
voteStackInArray.push(voteStack.votes[id].value ? voteStack.votes[id].value : '');
|
2020-02-04 15:23:46 +01:00
|
|
|
});
|
|
|
|
rows.push(
|
|
|
|
voteStackInArray
|
|
|
|
);
|
|
|
|
});
|
|
|
|
const headersComments = [
|
|
|
|
['comments'],
|
|
|
|
['pseudo', 'text', 'creation_date'],
|
2020-01-16 15:35:11 +01:00
|
|
|
];
|
2020-02-04 15:23:46 +01:00
|
|
|
const comments = [];
|
|
|
|
this.currentPoll.comments.map(item => {
|
|
|
|
comments.push(
|
|
|
|
[item.pseudo,
|
|
|
|
item.text,
|
|
|
|
item.date.date,
|
|
|
|
'\n']
|
2020-04-11 16:59:46 +02:00
|
|
|
);
|
2020-02-04 15:23:46 +01:00
|
|
|
});
|
|
|
|
headers.push(listOfChoices);
|
|
|
|
rows = [headers, listOfChoices, rows, headersComments, comments];
|
|
|
|
|
2020-04-11 16:59:46 +02:00
|
|
|
const convertedCsv = rows.map(elem => {
|
2020-02-05 11:13:36 +01:00
|
|
|
console.log('elem', elem);
|
2020-02-04 15:23:46 +01:00
|
|
|
return elem.map(item => {
|
|
|
|
console.log('item', item);
|
|
|
|
if (typeof item === typeof Array) {
|
2020-04-11 16:59:46 +02:00
|
|
|
return item.join('\n');
|
2020-02-04 15:23:46 +01:00
|
|
|
}
|
|
|
|
return item;
|
2020-04-11 16:59:46 +02:00
|
|
|
}).join('\n');
|
2020-02-04 15:23:46 +01:00
|
|
|
}).join('\n');
|
|
|
|
console.log('rows', rows);
|
|
|
|
console.log('convertedCsv', convertedCsv);
|
2020-01-16 15:35:11 +01:00
|
|
|
|
2020-04-11 16:59:46 +02:00
|
|
|
const csvContent = 'data:text/csv;charset=utf-8,'
|
2020-02-04 15:23:46 +01:00
|
|
|
+ convertedCsv;
|
2020-02-05 11:13:36 +01:00
|
|
|
console.log('csvContent', csvContent);
|
2020-04-11 16:59:46 +02:00
|
|
|
const encodedUri = encodeURI(csvContent);
|
|
|
|
const link = document.createElement('a');
|
|
|
|
link.setAttribute('href', encodedUri);
|
|
|
|
const exportFileName = (this.urlPublic ? this.urlPublic : this.utils.makeSlug(this)) + '_export_' + new Date() + '.csv';
|
|
|
|
link.setAttribute('download', exportFileName);
|
2020-01-16 15:35:11 +01:00
|
|
|
document.body.appendChild(link); // Required for FF
|
|
|
|
link.click(); // This will download the data file named "my_data.csv".
|
|
|
|
}
|
|
|
|
|
2020-04-11 17:23:52 +02:00
|
|
|
exportJson() {
|
|
|
|
this.download('export_poll_' + this.pollSlug + '.json', JSON.stringify(
|
|
|
|
{
|
|
|
|
export_date: new Date(),
|
|
|
|
creation_date: this.creationDate,
|
|
|
|
title: this.title,
|
|
|
|
description: this.description,
|
|
|
|
pollType: this.pollType,
|
|
|
|
urlPublic: this.urlPublic,
|
|
|
|
currentPoll: this.currentPoll,
|
|
|
|
votes: this.voteChoices
|
|
|
|
})
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
download(filename, text) {
|
|
|
|
var element = document.createElement('a');
|
|
|
|
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
|
|
|
|
element.setAttribute('download', filename);
|
|
|
|
|
|
|
|
element.style.display = 'none';
|
|
|
|
document.body.appendChild(element);
|
|
|
|
|
|
|
|
element.click();
|
|
|
|
|
|
|
|
document.body.removeChild(element);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-01-16 15:35:11 +01:00
|
|
|
print() {
|
|
|
|
alert('TODO');
|
|
|
|
}
|
|
|
|
|
2020-01-21 12:04:14 +01:00
|
|
|
todo(message = '') {
|
2020-01-16 15:35:11 +01:00
|
|
|
this.messageService.add({
|
2020-01-21 12:04:14 +01:00
|
|
|
severity: 'info' + message,
|
2020-04-11 16:59:46 +02:00
|
|
|
detail: 'cette fonctionnalité n\'est pas encore disponible. Venez en discuter sur framateam.org / Ux et design libre / Framasoft',
|
|
|
|
summary: 'Work in progress',
|
2020-01-16 15:35:11 +01:00
|
|
|
});
|
|
|
|
}
|
2020-04-02 17:59:33 +02:00
|
|
|
|
|
|
|
execStuff() {
|
|
|
|
const mockResponse = {
|
2020-04-11 16:59:46 +02:00
|
|
|
message: 'you created a vote stack from an existing owner : tktest@tktest.com',
|
|
|
|
poll: {
|
|
|
|
id: 3,
|
|
|
|
title: 'dessin animé préféré',
|
|
|
|
customUrl: null,
|
|
|
|
description: 'choisissez votre animé préféré',
|
|
|
|
creationDate: {
|
|
|
|
date: '2020-01-22 14:28:19.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
expiracyDate: {
|
|
|
|
date: '2020-01-22 14:28:19.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
owner: {
|
|
|
|
__initializer__: null,
|
|
|
|
__cloner__: null,
|
|
|
|
__isInitialized__: true,
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
email: 'tktest@tktest.com'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
kind: 'text',
|
|
|
|
allowedAnswers: [
|
|
|
|
'yes'
|
2020-04-02 17:59:33 +02:00
|
|
|
],
|
2020-04-11 16:59:46 +02:00
|
|
|
modificationPolicy: 'self',
|
|
|
|
mailOnComment: null,
|
|
|
|
mailOnVote: null,
|
|
|
|
hideResults: null,
|
|
|
|
showResultEvenIfPasswords: null,
|
|
|
|
votes: {},
|
|
|
|
stacksOfVotes: {},
|
|
|
|
choices: {},
|
|
|
|
comments: {},
|
|
|
|
defaultExpiracyDaysFromNow: 60
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
vote_stack: {
|
|
|
|
id: 43,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-04-02 17:55:45.201475',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
id: 93,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 5,
|
|
|
|
text: 'Vic le viking',
|
|
|
|
stack_id: 43
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
6: {
|
|
|
|
id: 94,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 43
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
7: {
|
|
|
|
id: 95,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 7,
|
|
|
|
text: 'Les mystérieuses cités d\'or',
|
|
|
|
stack_id: 43
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
8: {
|
|
|
|
id: 96,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 8,
|
|
|
|
text: 'Les mondes engloutis',
|
|
|
|
stack_id: 43
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
9: {
|
|
|
|
id: 97,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 9,
|
|
|
|
text: 'Foot 2 rue',
|
|
|
|
stack_id: 43
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
10: {
|
|
|
|
choice_id: 10
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
stacks: [
|
2020-04-02 17:59:33 +02:00
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 3,
|
|
|
|
modifier_token: 'sfdH00Fy17bt5c3Y5zYk5GDsX7Cl67cgec14Qd06V87g74JFOr2UOC2ZL8E919eBmI72W8f5keYDeWfrV7SQW35fw0Vg452k25w9BrS62MtOs89JjLQ',
|
|
|
|
pseudo: 'voting_people_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-22 14:28:19.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
choice_id: 5
|
|
|
|
},
|
|
|
|
6: {
|
|
|
|
id: 5,
|
|
|
|
value: 'maybe',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 3
|
|
|
|
},
|
|
|
|
7: {
|
|
|
|
id: 4,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 7,
|
|
|
|
text: 'Les mystérieuses cités d\'or',
|
|
|
|
stack_id: 3
|
|
|
|
},
|
|
|
|
8: {
|
|
|
|
choice_id: 8
|
|
|
|
},
|
|
|
|
9: {
|
|
|
|
choice_id: 9
|
|
|
|
},
|
|
|
|
10: {
|
|
|
|
choice_id: 10
|
|
|
|
},
|
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 4,
|
|
|
|
modifier_token: 'sfdH00Fy17bt5c3Y5zYk5GDsX7Cl67cgec14Qd06V87g74JFOr2UOC2ZL8E919eBmI72W8f5keYDeWfrV7SQW35fw0Vg452k25w9BrS62MtOs89JjLQ',
|
|
|
|
pseudo: 'voting_people_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-22 14:28:19.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
choice_id: 5
|
|
|
|
},
|
|
|
|
6: {
|
|
|
|
id: 6,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 4
|
|
|
|
},
|
|
|
|
7: {
|
|
|
|
id: 8,
|
|
|
|
value: 'no',
|
|
|
|
choice_id: 7,
|
|
|
|
text: 'Les mystérieuses cités d\'or',
|
|
|
|
stack_id: 4
|
|
|
|
},
|
|
|
|
8: {
|
|
|
|
choice_id: 8
|
|
|
|
},
|
|
|
|
9: {
|
|
|
|
choice_id: 9
|
|
|
|
},
|
|
|
|
10: {
|
|
|
|
choice_id: 10
|
|
|
|
},
|
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 5,
|
|
|
|
modifier_token: 'sfdH00Fy17bt5c3Y5zYk5GDsX7Cl67cgec14Qd06V87g74JFOr2UOC2ZL8E919eBmI72W8f5keYDeWfrV7SQW35fw0Vg452k25w9BrS62MtOs89JjLQ',
|
|
|
|
pseudo: 'voting_people_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-22 16:00:50.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
id: 9,
|
|
|
|
value: 'no',
|
|
|
|
choice_id: 5,
|
|
|
|
text: 'Vic le viking',
|
|
|
|
stack_id: 5
|
|
|
|
},
|
|
|
|
6: {
|
|
|
|
id: 10,
|
|
|
|
value: 'maybe',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 5
|
|
|
|
},
|
|
|
|
7: {
|
|
|
|
id: 11,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 7,
|
|
|
|
text: 'Les mystérieuses cités d\'or',
|
|
|
|
stack_id: 5
|
|
|
|
},
|
|
|
|
8: {
|
|
|
|
choice_id: 8
|
|
|
|
},
|
|
|
|
9: {
|
|
|
|
choice_id: 9
|
|
|
|
},
|
|
|
|
10: {
|
|
|
|
choice_id: 10
|
|
|
|
},
|
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 6,
|
|
|
|
modifier_token: 'W1275k1tOh7CA9e9F0VbD58teW3Z451848Sh14imcr90QY1d3tK415mHw9Ib8II8S91F2n8dhk135-20d9cT2mX3UfZ92aeuQdwcj32e17E0bc50fp3d',
|
|
|
|
pseudo: '',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-22 16:01:10.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
id: 12,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 5,
|
|
|
|
text: 'Vic le viking',
|
|
|
|
stack_id: 6
|
|
|
|
},
|
|
|
|
6: {
|
|
|
|
id: 13,
|
|
|
|
value: 'maybe',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 6
|
|
|
|
},
|
|
|
|
7: {
|
|
|
|
id: 14,
|
|
|
|
value: 'no',
|
|
|
|
choice_id: 7,
|
|
|
|
text: 'Les mystérieuses cités d\'or',
|
|
|
|
stack_id: 6
|
|
|
|
},
|
|
|
|
8: {
|
|
|
|
choice_id: 8
|
|
|
|
},
|
|
|
|
9: {
|
|
|
|
choice_id: 9
|
|
|
|
},
|
|
|
|
10: {
|
|
|
|
choice_id: 10
|
|
|
|
},
|
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 7,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-23 16:19:29.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
choice_id: 5
|
|
|
|
},
|
|
|
|
6: {
|
|
|
|
id: 15,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 7
|
|
|
|
},
|
|
|
|
7: {
|
|
|
|
choice_id: 7
|
|
|
|
},
|
|
|
|
8: {
|
|
|
|
choice_id: 8
|
|
|
|
},
|
|
|
|
9: {
|
|
|
|
choice_id: 9
|
|
|
|
},
|
|
|
|
10: {
|
|
|
|
id: 16,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 10,
|
|
|
|
text: 'Le chat, la vache, et l\'océan',
|
|
|
|
stack_id: 7
|
|
|
|
},
|
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 12,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-24 11:34:54.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
id: 21,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 5,
|
|
|
|
text: 'Vic le viking',
|
|
|
|
stack_id: 12
|
|
|
|
},
|
|
|
|
6: {
|
|
|
|
choice_id: 6
|
|
|
|
},
|
|
|
|
7: {
|
|
|
|
choice_id: 7
|
|
|
|
},
|
|
|
|
8: {
|
|
|
|
choice_id: 8
|
|
|
|
},
|
|
|
|
9: {
|
|
|
|
choice_id: 9
|
|
|
|
},
|
|
|
|
10: {
|
|
|
|
choice_id: 10
|
|
|
|
},
|
|
|
|
11: {
|
|
|
|
id: 22,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 11,
|
|
|
|
text: 'Digimon',
|
|
|
|
stack_id: 12
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 13,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-24 12:00:47.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
choice_id: 5
|
|
|
|
},
|
|
|
|
6: {
|
|
|
|
id: 23,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 13
|
|
|
|
},
|
|
|
|
7: {
|
|
|
|
id: 24,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 7,
|
|
|
|
text: 'Les mystérieuses cités d\'or',
|
|
|
|
stack_id: 13
|
|
|
|
},
|
|
|
|
8: {
|
|
|
|
choice_id: 8
|
|
|
|
},
|
|
|
|
9: {
|
|
|
|
id: 25,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 9,
|
|
|
|
text: 'Foot 2 rue',
|
|
|
|
stack_id: 13
|
|
|
|
},
|
|
|
|
10: {
|
|
|
|
choice_id: 10
|
|
|
|
},
|
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 14,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-24 12:01:47.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
id: 26,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 5,
|
|
|
|
text: 'Vic le viking',
|
|
|
|
stack_id: 14
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
6: {
|
|
|
|
choice_id: 6
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
7: {
|
|
|
|
choice_id: 7
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
8: {
|
|
|
|
choice_id: 8
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
9: {
|
|
|
|
choice_id: 9
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
10: {
|
|
|
|
choice_id: 10
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 15,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-24 12:07:15.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
choice_id: 5
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
6: {
|
|
|
|
id: 27,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 15
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
7: {
|
|
|
|
choice_id: 7
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
8: {
|
|
|
|
choice_id: 8
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
9: {
|
|
|
|
choice_id: 9
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
10: {
|
|
|
|
choice_id: 10
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 16,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-24 12:08:58.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
choice_id: 5
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
6: {
|
|
|
|
id: 28,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 16
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
7: {
|
|
|
|
choice_id: 7
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
8: {
|
|
|
|
choice_id: 8
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
9: {
|
|
|
|
choice_id: 9
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
10: {
|
|
|
|
choice_id: 10
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 17,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-24 12:09:15.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
choice_id: 5
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
6: {
|
|
|
|
choice_id: 6
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
7: {
|
|
|
|
id: 29,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 7,
|
|
|
|
text: 'Les mystérieuses cités d\'or',
|
|
|
|
stack_id: 17
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
8: {
|
|
|
|
choice_id: 8
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
9: {
|
|
|
|
choice_id: 9
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
10: {
|
|
|
|
choice_id: 10
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 18,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-24 12:15:45.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
choice_id: 5
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
6: {
|
|
|
|
choice_id: 6
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
7: {
|
|
|
|
id: 30,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 7,
|
|
|
|
text: 'Les mystérieuses cités d\'or',
|
|
|
|
stack_id: 18
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
8: {
|
|
|
|
choice_id: 8
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
9: {
|
|
|
|
choice_id: 9
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
10: {
|
|
|
|
choice_id: 10
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 19,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-24 12:16:50.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
id: 31,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 5,
|
|
|
|
text: 'Vic le viking',
|
|
|
|
stack_id: 19
|
|
|
|
},
|
|
|
|
6: {
|
|
|
|
id: 32,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 19
|
|
|
|
},
|
|
|
|
7: {
|
|
|
|
id: 33,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 7,
|
|
|
|
text: 'Les mystérieuses cités d\'or',
|
|
|
|
stack_id: 19
|
|
|
|
},
|
|
|
|
8: {
|
|
|
|
choice_id: 8
|
|
|
|
},
|
|
|
|
9: {
|
|
|
|
choice_id: 9
|
|
|
|
},
|
|
|
|
10: {
|
|
|
|
choice_id: 10
|
|
|
|
},
|
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 25,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-29 17:55:42.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
choice_id: 5
|
|
|
|
},
|
|
|
|
6: {
|
|
|
|
id: 44,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 25
|
|
|
|
},
|
|
|
|
7: {
|
|
|
|
choice_id: 7
|
|
|
|
},
|
|
|
|
8: {
|
|
|
|
choice_id: 8
|
|
|
|
},
|
|
|
|
9: {
|
|
|
|
id: 45,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 9,
|
|
|
|
text: 'Foot 2 rue',
|
|
|
|
stack_id: 25
|
|
|
|
},
|
|
|
|
10: {
|
|
|
|
id: 46,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 10,
|
|
|
|
text: 'Le chat, la vache, et l\'océan',
|
|
|
|
stack_id: 25
|
|
|
|
},
|
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 26,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-30 10:20:06.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
id: 47,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 5,
|
|
|
|
text: 'Vic le viking',
|
|
|
|
stack_id: 26
|
|
|
|
},
|
|
|
|
6: {
|
|
|
|
id: 48,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 26
|
|
|
|
},
|
|
|
|
7: {
|
|
|
|
id: 49,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 7,
|
|
|
|
text: 'Les mystérieuses cités d\'or',
|
|
|
|
stack_id: 26
|
|
|
|
},
|
|
|
|
8: {
|
|
|
|
id: 50,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 8,
|
|
|
|
text: 'Les mondes engloutis',
|
|
|
|
stack_id: 26
|
|
|
|
},
|
|
|
|
9: {
|
|
|
|
choice_id: 9
|
|
|
|
},
|
|
|
|
10: {
|
|
|
|
choice_id: 10
|
|
|
|
},
|
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 28,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-30 17:23:48.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
id: 53,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 5,
|
|
|
|
text: 'Vic le viking',
|
|
|
|
stack_id: 28
|
|
|
|
},
|
|
|
|
6: {
|
|
|
|
id: 54,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 28
|
|
|
|
},
|
|
|
|
7: {
|
|
|
|
id: 55,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 7,
|
|
|
|
text: 'Les mystérieuses cités d\'or',
|
|
|
|
stack_id: 28
|
|
|
|
},
|
|
|
|
8: {
|
|
|
|
choice_id: 8
|
|
|
|
},
|
|
|
|
9: {
|
|
|
|
choice_id: 9
|
|
|
|
},
|
|
|
|
10: {
|
|
|
|
id: 56,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 10,
|
|
|
|
text: 'Le chat, la vache, et l\'océan',
|
|
|
|
stack_id: 28
|
|
|
|
},
|
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 35,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-01-31 09:42:28.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
choice_id: 5
|
|
|
|
},
|
|
|
|
6: {
|
|
|
|
id: 69,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 35
|
|
|
|
},
|
|
|
|
7: {
|
|
|
|
id: 70,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 7,
|
|
|
|
text: 'Les mystérieuses cités d\'or',
|
|
|
|
stack_id: 35
|
|
|
|
},
|
|
|
|
8: {
|
|
|
|
choice_id: 8
|
|
|
|
},
|
|
|
|
9: {
|
|
|
|
choice_id: 9
|
|
|
|
},
|
|
|
|
10: {
|
|
|
|
choice_id: 10
|
|
|
|
},
|
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 37,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-02-05 10:38:47.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
choice_id: 5
|
|
|
|
},
|
|
|
|
6: {
|
|
|
|
choice_id: 6
|
|
|
|
},
|
|
|
|
7: {
|
|
|
|
choice_id: 7
|
|
|
|
},
|
|
|
|
8: {
|
|
|
|
id: 74,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 8,
|
|
|
|
text: 'Les mondes engloutis',
|
|
|
|
stack_id: 37
|
|
|
|
},
|
|
|
|
9: {
|
|
|
|
id: 75,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 9,
|
|
|
|
text: 'Foot 2 rue',
|
|
|
|
stack_id: 37
|
|
|
|
},
|
|
|
|
10: {
|
|
|
|
choice_id: 10
|
|
|
|
},
|
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 40,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-02-22 17:53:57.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
id: 82,
|
|
|
|
value: 'no',
|
|
|
|
choice_id: 5,
|
|
|
|
text: 'Vic le viking',
|
|
|
|
stack_id: 40
|
|
|
|
},
|
|
|
|
6: {
|
|
|
|
id: 83,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 40
|
|
|
|
},
|
|
|
|
7: {
|
|
|
|
choice_id: 7
|
|
|
|
},
|
|
|
|
8: {
|
|
|
|
id: 84,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 8,
|
|
|
|
text: 'Les mondes engloutis',
|
|
|
|
stack_id: 40
|
|
|
|
},
|
|
|
|
9: {
|
|
|
|
id: 85,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 9,
|
|
|
|
text: 'Foot 2 rue',
|
|
|
|
stack_id: 40
|
|
|
|
},
|
|
|
|
10: {
|
|
|
|
choice_id: 10
|
|
|
|
},
|
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 41,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-04-01 12:24:37.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
id: 86,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 5,
|
|
|
|
text: 'Vic le viking',
|
|
|
|
stack_id: 41
|
|
|
|
},
|
|
|
|
6: {
|
|
|
|
id: 87,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 41
|
|
|
|
},
|
|
|
|
7: {
|
|
|
|
id: 88,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 7,
|
|
|
|
text: 'Les mystérieuses cités d\'or',
|
|
|
|
stack_id: 41
|
|
|
|
},
|
|
|
|
8: {
|
|
|
|
choice_id: 8
|
|
|
|
},
|
|
|
|
9: {
|
|
|
|
id: 89,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 9,
|
|
|
|
text: 'Foot 2 rue',
|
|
|
|
stack_id: 41
|
|
|
|
},
|
|
|
|
10: {
|
|
|
|
id: 90,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 10,
|
|
|
|
text: 'Le chat, la vache, et l\'océan',
|
|
|
|
stack_id: 41
|
|
|
|
},
|
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 43,
|
|
|
|
modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
creation_date: {
|
|
|
|
date: '2020-04-02 17:55:45.201475',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
votes: {
|
|
|
|
5: {
|
|
|
|
id: 93,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 5,
|
|
|
|
text: 'Vic le viking',
|
|
|
|
stack_id: 43
|
|
|
|
},
|
|
|
|
6: {
|
|
|
|
id: 94,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 6,
|
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
stack_id: 43
|
|
|
|
},
|
|
|
|
7: {
|
|
|
|
id: 95,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 7,
|
|
|
|
text: 'Les mystérieuses cités d\'or',
|
|
|
|
stack_id: 43
|
|
|
|
},
|
|
|
|
8: {
|
|
|
|
id: 96,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 8,
|
|
|
|
text: 'Les mondes engloutis',
|
|
|
|
stack_id: 43
|
|
|
|
},
|
|
|
|
9: {
|
|
|
|
id: 97,
|
|
|
|
value: 'yes',
|
|
|
|
choice_id: 9,
|
|
|
|
text: 'Foot 2 rue',
|
|
|
|
stack_id: 43
|
|
|
|
},
|
|
|
|
10: {
|
|
|
|
choice_id: 10
|
|
|
|
},
|
|
|
|
11: {
|
|
|
|
choice_id: 11
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2020-04-11 16:59:46 +02:00
|
|
|
comments: [
|
2020-04-02 17:59:33 +02:00
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 4,
|
|
|
|
text: 'wouah trop bien framadate HOUHOUUUU!',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
date: {
|
|
|
|
date: '2020-01-22 16:00:22.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 6,
|
|
|
|
text: 'wouah trop bien framadate! zerf zrg ergetetht',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
date: {
|
|
|
|
date: '2020-01-22 16:09:32.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 7,
|
|
|
|
text: 'comment numléro 4\n',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
date: {
|
|
|
|
date: '2020-01-22 16:09:51.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 8,
|
|
|
|
text: 'wouah trop bien framadate!',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
date: {
|
|
|
|
date: '2020-01-22 16:15:24.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 9,
|
|
|
|
text: 'wouah trop bien framadate zef ret r e re!',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
date: {
|
|
|
|
date: '2020-01-23 14:11:21.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 13,
|
|
|
|
text: 'OUAIIII',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
date: {
|
|
|
|
date: '2020-01-23 16:35:52.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 14,
|
|
|
|
text: 'MAAAAHAHAHAHHAA',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
date: {
|
|
|
|
date: '2020-01-23 16:36:04.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 16,
|
|
|
|
text: 'Meeeeeh',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
date: {
|
|
|
|
date: '2020-01-23 18:37:49.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 18,
|
|
|
|
text: 'wouah trop bien framadate!',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
date: {
|
|
|
|
date: '2020-01-24 11:34:58.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 19,
|
|
|
|
text: 'Ndjdjkddkld',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
date: {
|
|
|
|
date: '2020-01-24 11:35:08.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 20,
|
|
|
|
text: 'wouah trop bien framadate!',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
date: {
|
|
|
|
date: '2020-01-24 12:16:24.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 21,
|
|
|
|
text: 'encore un commentaire ',
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
date: {
|
|
|
|
date: '2020-01-24 12:16:38.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2020-04-11 16:59:46 +02:00
|
|
|
choices: [
|
2020-04-02 17:59:33 +02:00
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 5,
|
|
|
|
date: {
|
|
|
|
date: '2020-01-22 14:28:19.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
text: 'Vic le viking',
|
|
|
|
url: null
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 6,
|
|
|
|
date: {
|
|
|
|
date: '2020-01-22 14:28:19.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
text: 'Boumbo petite automobile',
|
|
|
|
url: null
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 7,
|
|
|
|
date: {
|
|
|
|
date: '2020-01-22 14:28:19.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
text: 'Les mystérieuses cités d\'or',
|
|
|
|
url: null
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 8,
|
|
|
|
date: {
|
|
|
|
date: '2020-01-22 14:28:19.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
text: 'Les mondes engloutis',
|
|
|
|
url: null
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 9,
|
|
|
|
date: {
|
|
|
|
date: '2020-01-22 14:28:19.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
text: 'Foot 2 rue',
|
|
|
|
url: null
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 10,
|
|
|
|
date: {
|
|
|
|
date: '2020-01-22 14:28:19.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
text: 'Le chat, la vache, et l\'océan',
|
|
|
|
url: null
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
id: 11,
|
|
|
|
date: {
|
|
|
|
date: '2020-01-22 14:28:19.000000',
|
|
|
|
timezone_type: 3,
|
|
|
|
timezone: 'Europe/Paris'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
text: 'Digimon',
|
|
|
|
url: null
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
],
|
2020-04-11 16:59:46 +02:00
|
|
|
choices_count: {
|
|
|
|
counts: {
|
|
|
|
5: {
|
|
|
|
choice_id: 5,
|
|
|
|
choice_text: 'Vic le viking',
|
|
|
|
id: 9,
|
|
|
|
score: 8,
|
|
|
|
yes: {
|
|
|
|
count: 8,
|
|
|
|
people: [
|
|
|
|
'',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST'
|
2020-04-02 17:59:33 +02:00
|
|
|
]
|
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
maybe: {
|
|
|
|
count: 0,
|
|
|
|
people: []
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
no: {
|
|
|
|
count: 2,
|
|
|
|
people: [
|
|
|
|
'voting_people_TEST',
|
|
|
|
'tk_TEST'
|
2020-04-02 17:59:33 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
6: {
|
|
|
|
choice_id: 6,
|
|
|
|
choice_text: 'Boumbo petite automobile',
|
|
|
|
id: 5,
|
|
|
|
score: 14.5,
|
|
|
|
yes: {
|
|
|
|
count: 13,
|
|
|
|
people: [
|
|
|
|
'voting_people_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST'
|
2020-04-02 17:59:33 +02:00
|
|
|
]
|
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
maybe: {
|
|
|
|
count: 3,
|
|
|
|
people: [
|
|
|
|
'voting_people_TEST',
|
|
|
|
'voting_people_TEST',
|
|
|
|
''
|
2020-04-02 17:59:33 +02:00
|
|
|
]
|
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
no: {
|
|
|
|
count: 0,
|
|
|
|
people: []
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
7: {
|
|
|
|
choice_id: 7,
|
|
|
|
choice_text: 'Les mystérieuses cités d\'or',
|
|
|
|
id: 4,
|
|
|
|
score: 12,
|
|
|
|
yes: {
|
|
|
|
count: 12,
|
|
|
|
people: [
|
|
|
|
'voting_people_TEST',
|
|
|
|
'voting_people_TEST',
|
|
|
|
'voting_people_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST'
|
2020-04-02 17:59:33 +02:00
|
|
|
]
|
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
maybe: {
|
|
|
|
count: 0,
|
|
|
|
people: []
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
no: {
|
|
|
|
count: 2,
|
|
|
|
people: [
|
|
|
|
'voting_people_TEST',
|
|
|
|
''
|
2020-04-02 17:59:33 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
8: {
|
|
|
|
choice_id: 8,
|
|
|
|
choice_text: 'Les mondes engloutis',
|
|
|
|
id: 50,
|
|
|
|
score: 4,
|
|
|
|
yes: {
|
|
|
|
count: 4,
|
|
|
|
people: [
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST'
|
2020-04-02 17:59:33 +02:00
|
|
|
]
|
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
maybe: {
|
|
|
|
count: 0,
|
|
|
|
people: []
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
no: {
|
|
|
|
count: 0,
|
|
|
|
people: []
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
9: {
|
|
|
|
choice_id: 9,
|
|
|
|
choice_text: 'Foot 2 rue',
|
|
|
|
id: 25,
|
|
|
|
score: 6,
|
|
|
|
yes: {
|
|
|
|
count: 6,
|
|
|
|
people: [
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST'
|
2020-04-02 17:59:33 +02:00
|
|
|
]
|
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
maybe: {
|
|
|
|
count: 0,
|
|
|
|
people: []
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
no: {
|
|
|
|
count: 0,
|
|
|
|
people: []
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
10: {
|
|
|
|
choice_id: 10,
|
|
|
|
choice_text: 'Le chat, la vache, et l\'océan',
|
|
|
|
id: 16,
|
|
|
|
score: 4,
|
|
|
|
yes: {
|
|
|
|
count: 4,
|
|
|
|
people: [
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST',
|
|
|
|
'tk_TEST'
|
2020-04-02 17:59:33 +02:00
|
|
|
]
|
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
maybe: {
|
|
|
|
count: 0,
|
|
|
|
people: []
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
no: {
|
|
|
|
count: 0,
|
|
|
|
people: []
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
11: {
|
|
|
|
choice_id: 11,
|
|
|
|
choice_text: 'Digimon',
|
|
|
|
id: 22,
|
|
|
|
score: 1,
|
|
|
|
yes: {
|
|
|
|
count: 1,
|
|
|
|
people: [
|
|
|
|
'tk_TEST'
|
2020-04-02 17:59:33 +02:00
|
|
|
]
|
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
maybe: {
|
|
|
|
count: 0,
|
|
|
|
people: []
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
no: {
|
|
|
|
count: 0,
|
|
|
|
people: []
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
maxScore: 14.5
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
vote_count: 21,
|
|
|
|
owner: {
|
|
|
|
__initializer__: null,
|
|
|
|
__cloner__: null,
|
|
|
|
__isInitialized__: true,
|
|
|
|
pseudo: 'tk_TEST',
|
|
|
|
email: 'tktest@tktest.com'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
2020-04-11 16:59:46 +02:00
|
|
|
owner_modifier_token: 'b88Qnb1A515Sfedee8b74d726A32444m87cn9Zc0f9t6Ued516f76235V93tBKcJVJearh061S8I0o5l24wbIaMe2v4wg76dhEBBi9m-28Qa601b664L',
|
|
|
|
admin_key: 'A8jZ9oc1jsFGZJ024c457f0Wj1bYca5m6537cm9nCg7catZdc18ke5Kqd449eL290oHCqdu3SNmkC7yIHj96n6dnU7ca7qdaf2VSRMI48eXd61O9a3U',
|
|
|
|
json_you_sent: {
|
|
|
|
pseudo: 'mon pseudo',
|
|
|
|
email: 'tktest@tktest.com',
|
|
|
|
votes: [
|
2020-04-02 17:59:33 +02:00
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
choice_id: 5,
|
|
|
|
value: 'yes'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
choice_id: 6,
|
|
|
|
value: 'yes'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
choice_id: 7,
|
|
|
|
value: 'yes'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
choice_id: 8,
|
|
|
|
value: 'yes'
|
2020-04-02 17:59:33 +02:00
|
|
|
},
|
|
|
|
{
|
2020-04-11 16:59:46 +02:00
|
|
|
choice_id: 9,
|
|
|
|
value: 'yes'
|
2020-04-02 17:59:33 +02:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
};
|
|
|
|
this.updateCurrentPollFromResponse(mockResponse);
|
|
|
|
}
|
2019-12-03 17:20:57 +01:00
|
|
|
}
|