Permalink
Browse files

convert all room IDs to strings

  • Loading branch information...
1 parent 128decf commit 321286cb9d988a77f27753ed4d83246a23d575e0 cloudhead committed Dec 6, 2010
Showing with 3 additions and 1 deletion.
  1. +1 −0 src/session/index.js
  2. +2 −1 src/todo/index.js
View
@@ -6,6 +6,7 @@ var md5 = require('../md5');
this.resource = session;
this.post = function (res, id, params, sess) {
+ id = id.toString();
if (sess) {
todo.get(id, function (e, doc) {
if (! doc.password) {
View
@@ -10,6 +10,7 @@ this.resource = todo;
// Retrieve a list
//
this.get = function (res, id, params, session) {
+ id = id.toString();
todo.get(id, function (e, doc) {
if (e) {
res.send(doc.headers.status, {}, e);
@@ -34,7 +35,7 @@ this.get = function (res, id, params, session) {
// Update a list, or create a named list
//
this.put = function (res, id, params) {
- todo.save(id, function (e, doc) {
+ todo.save(id.toString(), function (e, doc) {
if (e) {
res.send(doc.headers.status, {}, e);
} else {

0 comments on commit 321286c

Please sign in to comment.