혹시 updateOne 로는 _id 를 수정할수 없나요?
post 와 put 요청 두 방법으로 다 해 봤는데 안되네요...
필드만 다른것으로 바꾸니 잘 변경돼서 원래 _id 는 한번 생성하면 수정이 안되는건가 싶네요
app.put('/reset_num', function (요청, 응답) {
db.collection('post').updateOne({ title: 'asdasdsad' }, { $set: { _id: 1314 } }, function (에러, 결과) {
if (에러) {return console.log('에러');}
응답.redirect('/');
});
});