Mongoose - Version Error: No matching document found for id

前端 未结 4 1853
眼角桃花
眼角桃花 2020-12-12 01:59

Context: I have a Post Mongoose model that contains a csv_files array field to store csv strings. I make a fetch API

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-12 02:22

    Looks like @robertklep was right. I fixed my issue by wrapping the first API call in a Promise and then executing the second API call after the first one completed.

    I'll wait to mark this as the answer just in case anyone comes across a better solution.

提交回复
热议问题