【问题标题】:Buildfire - bulkInsert ErrorBuildfire - bulkInsert 错误
【发布时间】:2017-08-30 16:07:51
【问题描述】:

我正在尝试执行 bulkInsert,但我不断收到 400 错误消息:

{code: "VALIDATION", message: "Invalid parameters"}

这是我的代码:

import React, { Component } from 'react';

class App extends Component {
  constructor(props) {
    super(props);

    this.testFn = this.testFn.bind(this);
  }


  testFn() {
    const data = [{name:"John Doe", tel:"555-111-1111"},{name:"John Doe", tel:"555-222-2222"}];

    buildfire.publicData.bulkInsert(data, 'testTag', function(err, res) {
      if (err) {
        console.log("ERROR", err);
      } else {
        console.log("SUCCESSFULLY BULK INSERTED", res);
      }
    });
  }


  render() {
    return (
      <div>
        <button onClick={this.testFn}>Test Insert</button>
      </div>
    );
  }
}

export default App;

如果我将 buildfire.publicData.bulkInsert 更改为 buildfire.publicData.insert 调用成功,我可以在 res.data 中找到我的数组,但我想要每个对象创造它自己的记录。我试图保存的示例数据直接来自文档。

【问题讨论】:

    标签: buildfire


    【解决方案1】:

    我已经能够重现您描述的问题,尽管它似乎不再是问题。也许这是一个暂时的故障,或者最近系统发生了一些变化。

    我建议再试一次,因为它现在似乎工作正常。

    【讨论】:

      猜你喜欢
      • 2022-08-03
      • 2018-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多