在使用 meteor 集合时从开发控制台收到“找不到方法 [404]”错误
Getting a "method not found [404]" error from dev console while working with meteor collections
我正在尝试使用由我的 mongo 模式制作的自动表单将文档插入我的 meteor 集合中,但是当我按下提交按钮时,它在开发控制台中给了我一个"找不到方法 [404]"错误。 我相信它来自以下代码:
GameList.allow({
insert: function(userId, doc){
return !!userId;
}
});
这允许用户在以用户身份登录时将文档添加到数据库中。如果没有此代码,我将收到"未授权 [403]"错误,因为我从我的 meteor 应用程序中取出了不安全的软件包。 知道是什么原因导致此方法未找到错误吗?
自动套用代码:
{{> quickForm collection="GameList" id="insertGameForm" type="insert" class="newGameForm"}}
自动表单的架构:
GameListSchema = new SimpleSchema({
title: {
type: String,
label: "Title"
},
platform: {
type: String,
label: "Platform"
},
category: {
type: String,
label: "Category"
},
gameRank: {
type: String,
label: "GameRank"
},
auth: {
type: String,
label: "Author",
autoValue: function(){
return this.userId
},
autoform: {
type: "hidden"
}
}
});
GameList.attachSchema(GameListSchema);
我相信
这种情况正在发生,因为根据 Meteor 文档,您的允许/拒绝规则应该在服务器上运行。 尝试将它们放在服务器端代码上并再次运行。
相关文章:
- 错误405:向Java控制器(Ajax)发送JSON时找不到POST方法
- 我找不到使用量角器选择此链接的方法
- jQuery/can'我找不到避免代码添加类的方法
- jQuery UI加载不正确?找不到对话框方法
- 找不到方法'附加'for sharejs对象
- jQuery方法找不到选择器
- 我可以'我找不到一种将数据库源添加到dgrid的优雅方法
- 找不到方法集活动表(字符串)
- 找不到 Javascript 原型方法覆盖
- Web API:找不到方法和不允许的方法
- 在使用 meteor 集合时从开发控制台收到“找不到方法 [404]”错误
- NAV Javascript AddIn 方法不起作用:找不到方法 'Page90005.PageName58a58aU
- 在对象上找不到 JavaScript 原型方法
- 代码命中找不到修复方法
- Javascript 按钮 OnClick 找不到我想要的方法
- 找不到流星调用方法
- jQuery灯箱.可以'找不到方法
- Sinon找不到方法'间谍'
- 在jquery中调用代码隐藏方法,但找不到该方法
- 找不到方法node.js模块