Google 크롬 콘솔에서이 코드를 사용하여 선택기로 문서를 제거하려고 할 때 저와 같은 오류를 본 적이 있습니까?
Products.remove({name:"ABC"});
오류는 다음과 같습니다.
Uncaught
Meteor.makeErrorType.errorClass {error: 403, reason: "Not permitted. Untrusted code may only remove documents by ID.", details: undefined,
message: "Not permitted. Untrusted code may only remove documents by ID. [403]", errorType: "Meteor.Error"…}
그래서 선택기로 문서를 제거하려면 어떻게해야합니까?
이러지마 근데
Products.remove({_id: Products.findOne({name:"ABC"})._id});
더 나은 사용 방법 ...
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다