"use strict";

var Model = require('./model');

module.exports = new Restifier();
module.exports.Restifier = Restifier;

function Restifier() {
  this.prefix = '';
}

Restifier.prototype.initialize = function() {
  return require('res-error')({
    log: false
  });
};

Restifier.prototype.model = function(mongooseModel) {
  return new Model(this, mongooseModel);
};

"use strict";

var Model = require('./model');

module.exports = new Restifier();
module.exports.Restifier = Restifier;

function Restifier() {
  this.models = [];
}

Restifier.prototype.initialize = function() {
  return require('res-error')({
    log: false
  });
};

Restifier.prototype.model = function(mongooseModel) {
  var m = new Model(this, mongooseModel);
  this.models.push(m);
  return m;
};

Store models in restifier instance
Store models in restifier instance

Signed-off-by: Ian Macalinao <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@ian.pw>
