Comparing version 0.9.3 to 0.9.4
@@ -110,3 +110,3 @@ "use strict"; | ||
}); | ||
Object.entries(this._schema).map(function (item) { | ||
Object.entries(this._schema).forEach(function (item) { | ||
var key = item[0], v = item[1]; | ||
@@ -113,0 +113,0 @@ _this.propsKeyMap[v.name] = __assign({ key: key }, v); |
@@ -163,6 +163,8 @@ "use strict"; | ||
return __generator(this, function (_a) { | ||
this.reqeust.post('/api/v3/submitTransaction', { | ||
// requestId: this.genId(), | ||
operations: this.transactions | ||
}); | ||
if (this.transactions.length) { | ||
this.reqeust.post('/api/v3/submitTransaction', { | ||
// requestId: this.genId(), | ||
operations: this.transactions | ||
}); | ||
} | ||
this.transactions = []; | ||
@@ -169,0 +171,0 @@ return [2 /*return*/]; |
{ | ||
"name": "notabase", | ||
"version": "0.9.3", | ||
"version": "0.9.4", | ||
"description": "API Wrapper For Notion's Database", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -70,3 +70,3 @@ import * as utils from './utils'; | ||
Object.entries(this._schema).map(item => { | ||
Object.entries(this._schema).forEach(item => { | ||
let [key, v] = item | ||
@@ -73,0 +73,0 @@ this.propsKeyMap[v.name] = { |
@@ -124,6 +124,8 @@ import { Collection } from './collection'; | ||
async submit() { | ||
this.reqeust.post('/api/v3/submitTransaction', { | ||
// requestId: this.genId(), | ||
operations: this.transactions | ||
}) | ||
if (this.transactions.length) { | ||
this.reqeust.post('/api/v3/submitTransaction', { | ||
// requestId: this.genId(), | ||
operations: this.transactions | ||
}) | ||
} | ||
this.transactions = [] | ||
@@ -130,0 +132,0 @@ } |
102431
2362