Skip to content

Commit

Permalink
update crudl-model dependency and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
dgf committed Apr 19, 2012
1 parent 9136b4e commit 660b3e8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/c3store.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
sid: sid
}
};
return this.Session["delete"](q, success, error);
return this.Session.destroy(q, success, error);
};

C3Store.prototype.length = function(callback) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "c3store"
, "version": "0.0.2"
, "version": "0.0.3"
, "author": "Danny Gräf <github@dagnu.de>"

, "keywords": ["session", "store", "SQL"]
Expand All @@ -20,7 +20,7 @@
"coffee-script": "1.2.x"
, "underscore": "1.3.x"
, "sequelize": "1.3.x"
, "crudl-model": "0.0.x"
, "crudl-model": "0.1.x"
}
, "devDependencies": {
"connect": "1.8.x"
Expand Down
7 changes: 5 additions & 2 deletions src/c3store.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class C3Store
success = -> callback?()
error = (error) -> callback? error
q = where: sid: sid
@Session.delete q, success, error
@Session.destroy q, success, error

length: (callback) ->
success = (count) -> callback? count
Expand All @@ -53,5 +53,8 @@ class C3Store
@Session.create s, success, error

module.exports = (connect) ->
#
C3Store:: __proto__ = connect.session.Store.prototype
(sequelize, model) -> new C3Store sequelize.define 'Session', _.extend(SessionModel, model)

(sequelize, model) -> new C3Store sequelize.define 'Session',
_.extend(SessionModel, model)

0 comments on commit 660b3e8

Please sign in to comment.