Accounts = new Mongo.Collection('accounts');
(账户报表)
var accountPhone = {'phoneNum': phoneNum};
if (Accounts.find(accountPhone).sort({$natural:-1}).limit(1)) {
(发出错误的行,在POST调用中调用)
当我打电话时,我得到了这个
TypeError: Object [object Object] has no method 'sort'
at Object.Api.addRoute.post.action (okey-api2.js:98:51)
at Route.Route._callEndpoint (packages/nimble_restivus/packages/nimble_restivus.js:318:1)
at packages/nimble_restivus/packages/nimble_restivus.js:209:1
at packages/simple_json-routes/packages/simple_json-routes.js:53:1