DB not updated without await infront of the method

前端 未结 0 1298
伪装坚强ぢ
伪装坚强ぢ 2020-12-13 20:42

Hello I have following piece of code:

  async create(data) {
    const document = new this.productModel(data);

    const created = await document.save();

           


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题