From 15e4f987a6ab9552a43ac659ba6d8307928c589d Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Wed, 20 Jun 2012 16:45:39 -0400 Subject: [PATCH] don't use model async increase (revisit this) --- src/app/index.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/index.coffee b/src/app/index.coffee index cf62864c52..309c334f45 100644 --- a/src/app/index.coffee +++ b/src/app/index.coffee @@ -3,14 +3,16 @@ ## ROUTES ## newUser = (model, userId) -> - model.async.incr 'configs.1.nextUserId', (err, userId) -> + # TODO this used to be model.async.incr, revisit this + model.incr 'configs.1.nextUserId', (err, userId) -> model.set '_session.userId', userId model.set "users.#{userId}", name: 'User ' + userId money: 0 exp: 0 lvl: 1 - + hp: 50 + habits: # TODO :{type: 'habit'} should be coded instead as a model function so as not to clutter the database 0: {id: 0, type: 'habit', text: 'Take the stairs', notes: '', score: 0, up: true, down: true}