PJJkpqnF
2017-01-12 03:38:03

const firebaseHelper = require('./firebaseHelper');

firebaseHelper.initFirebase();

firebaseHelper.deleteQueueTasks();
// firebaseHelper.deleteSurveys()
// firebaseHelper.deleteContactByLocationId('-K_LJ1LvSETd_jfCpc4a')

let task = {
firstName: 'John',
lastName: 'Walker',
email: 'vbabutskiy@gmail.com',
phone: '+79185687328',
locationId: '-K_LJ1LvSETd_jfCpc4a',
origin: 'Bridge',
// surveyTemplateId: "-KVS4JQVFwPJTA-MfSwV",
userId: '4V1h0vW1BSbF6eRUdkIL2ObVFpG3',
allowDuplicate: true
};
//
// firebaseHelper.getContactByLocationId('-K_LJ1LvSETd_jfCpc4a')
// .then((result) => {
// console.log(result)
// })
// firebaseHelper.addTask(task)
// .then((key) => {
// console.log(key)
// });

// let contacts = [
// {
// createdAt: "2016-12-28T02:59:08.000Z",
// email: "kissybear31@hotmail.com",
// firstName: "2464",
// lastName: "McGibbon",
// locationId: "-K_LJ1PmFGw6yNU_brOC"
// },
// {
// createdAt: "2016-12-28T02:59:08.000Z",
// email: "test@test.com",
// firstName: "Mel",
// lastName: "Gibson",
// locationId: "-K_LJ1PmFGw6yNU_brOC"
// },
// {
// createdAt: "2016-12-16T01:56:01.000Z",
// email: "abbagoose@gmail.com",
// firstName: "Abby",
// lastName: "Holt",
// locationId: "-K_LJ1PlUdj48Y3EhEzE",
// },
// {
// createdAt: "2016-12-16T01:56:01.000Z",
// email: "abbagoose@gmail.com",
// firstName: "Abby",
// locationId: "-K_LJ1PlUdj48Y3EhEzE",
// },
// {
// createdAt: "2016-12-16T01:56:01.000Z",
// email: "abbagoose@gmail.com",
// firstName: "Abby",
// locationId: "-K_LJ1LvSETd_jfCpc4a",
// },
// ];

// for (let contact of contacts) {
// firebaseHelper.addNewContact(contact.locationId, contact)
// .then((key) => {
// console.log(key)
// });
// }