diff --git a/lib/cashbox-batches.js b/lib/cashbox-batches.js index 67cd027c..8c2604e9 100644 --- a/lib/cashbox-batches.js +++ b/lib/cashbox-batches.js @@ -13,8 +13,6 @@ function createCashboxBatch (rec) { const newBatch = await t.oneOrNone(sql, [rec.deviceId]) return t.oneOrNone(sql2, [newBatch.id, newBatch.device_id]) }) - .then(data => data) - .catch(error => error) } module.exports = { createCashboxBatch } diff --git a/migrations/1616528363530-add_cashbox_batches.js b/migrations/1616528363530-add_cashbox_batches.js index fb257e23..d8e8f43b 100644 --- a/migrations/1616528363530-add_cashbox_batches.js +++ b/migrations/1616528363530-add_cashbox_batches.js @@ -3,7 +3,7 @@ var db = require('./db') exports.up = function (next) { var sqls = [ `create table cashbox_batches ( - id serial PRIMARY KEY, + id uuid PRIMARY KEY, device_id text REFERENCES devices (device_id), created timestamptz NOT NULL default now() )`,