Skip to content

Commit

Permalink
Extend the schema for sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Prodromou committed Dec 1, 2012
1 parent 881dbd5 commit 3d921d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

var _ = require("underscore"),
var express = require("express"),
_ = require("underscore"),
Activity = require("./model/activity").Activity,
ActivityObject = require("./model/activityobject").ActivityObject,
User = require("./model/user").User,
Expand All @@ -28,6 +29,7 @@ var _ = require("underscore"),
Nonce = require("./model/nonce").Nonce,
Credentials = require("./model/credentials").Credentials,
DialbackRequest = require("./model/dialbackrequest").DialbackRequest,
DatabankStore = require('connect-databank')(express),
Other = require("./model/other").Other;

var getSchema = function() {
Expand All @@ -49,6 +51,8 @@ var getSchema = function() {
schema[Other.type] = Other.schema;
schema[DialbackRequest.type] = DialbackRequest.schema;

_.extend(schema, DatabankStore.schema);

for (i = 0; i < ActivityObject.objectTypes.length; i++) {
type = ActivityObject.objectTypes[i];
Cls = ActivityObject.toClass(type);
Expand Down
3 changes: 2 additions & 1 deletion test/schema-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ var types = [
"credentials",
"other",
"dialbackrequest",
"session"
"session",
"sessionlist"
];

vows.describe("schema module interface").addBatch({
Expand Down

0 comments on commit 3d921d9

Please sign in to comment.