how to refactor mongoose document update code to return updated item instead of status

后端 未结 0 1917
孤城傲影
孤城傲影 2021-01-03 13:01

I was wondering how I might be refactor the following to return the updated document.

const updated = await item.update(
  { name: data.name, $inc: { seq: 1 }         


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