Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add newsletter field to data model

  • Loading branch information...
commit 5839bc3878aef0040f540f86f48d9bf1f0a8c6e5 1 parent f1e7103
@zaach zaach authored
View
5 lib/api/v1/account.js
@@ -14,8 +14,9 @@ module.exports = {
},
description: 'Stage a new account',
schema: {
- email: B(),
- pass: S()
+ email: S(),
+ pass: S(),
+ newsletter: B()
},
response: {
success: B()
View
1  lib/db/couchbase.js
@@ -17,6 +17,7 @@ module.exports = {
var account = {
pass: data.pass,
email: data.email,
+ newsletter: !!data.newsletter,
staged: true
};
db.set(data.email, account, function (err, meta) {
View
2  lib/db/json.js
@@ -13,8 +13,8 @@ module.exports = {
var account = {
pass: data.pass,
email: data.email,
+ newsletter: !!data.newsletter,
staged: false
- //staged: true
};
setTimeout(function() {
db[data.email] = account;
View
3  test/api.v1.account.js
@@ -22,7 +22,8 @@ describe('/api/v1/account', function() {
it('staging should return success', function(done) {
client.account({
email: 'foo',
- pass: 'bar'
+ pass: 'bar',
+ newsletter: false
}, function(err, r) {
should.not.exist(err);
should.exist(r);
Please sign in to comment.
Something went wrong with that request. Please try again.