我注册用户后收到了错误的请求。插入mongolab的数据很好,但它会呈现一个“错误请求”的页面。我检查了我的代码一百次,我发现它没有任何问题。
谢谢
用户模型
np.outer(a, b.flatten()).reshape(a.shape + b.shape)
EJS
var UserSchema = new Schema({
username: {type:String,
lowercase: true,
require: true
},
email: String,
isAdmin: String,
password: {type: String,
require: true
}
});
路线 //注册用户
<form action="/user/register" method="POST">
<div class="form-group">
<label>Username: </label><input type="text" placeholder="username" name="username" class="form-control" />
</div>
<div class="form-group">
<label>Email:</label> <input type="email" placeholder="email" name="email" class="form-control" />
</div>
<div class="form-group">
<label>Password:</label> <input type="password" placeholder="password" name="password1" class="form-control" />
</div>
<div class="form-group">
<label>Retype Password: </label><input type="password" placeholder="passowrd" name="password2" class="form-control" />
</div>
<button class="btn btn-success btn-lg">Register</button>
</form>