Finished support for triggered campaigns. So far only smoke-tested for subscription trigger.
This commit is contained in:
parent
4f5b2d10e4
commit
b37ad9863c
56 changed files with 416 additions and 213 deletions
32
server/dbtest.js
Normal file
32
server/dbtest.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
'use strict';
|
||||
|
||||
const config = require('config');
|
||||
const knex = require('./lib/knex');
|
||||
const moment = require('moment');
|
||||
const shortid = require('shortid');
|
||||
|
||||
async function run() {
|
||||
// const info = await knex('subscription__1').columnInfo();
|
||||
// console.log(info);
|
||||
|
||||
// const ts = moment().toDate();
|
||||
const ts = new Date(Date.now());
|
||||
console.log(ts);
|
||||
|
||||
const cid = shortid.generate();
|
||||
|
||||
await knex('subscription__1')
|
||||
.insert({
|
||||
email: cid,
|
||||
cid,
|
||||
custom_date_mmddyy_rjkeojrzz: ts
|
||||
});
|
||||
|
||||
|
||||
const row = await knex('subscription__1').select(['id', 'created', 'custom_date_mmddyy_rjkeojrzz']).where('cid', cid).first();
|
||||
|
||||
// const row = await knex('subscription__1').where('id', 2).first();
|
||||
console.log(row);
|
||||
}
|
||||
|
||||
run();
|
Loading…
Add table
Add a link
Reference in a new issue