glutenfree
Version:
A profiler/loganalyzer for nginx/Cetrea Aw.
36 lines (27 loc) • 1.09 kB
JavaScript
// Generated by CoffeeScript 1.6.3
var BedsMapper, Mapper,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Mapper = require("../Mapper.js").mapper;
BedsMapper = (function(_super) {
__extends(BedsMapper, _super);
function BedsMapper() {
this.identifier = "beds";
}
BedsMapper.prototype.schema = function(method, action, endpoint, fun, args) {
switch (fun.toLowerCase()) {
case "byorganization":
return this.map(["Organization.Id"], args);
}
};
BedsMapper.prototype.applySchema = function(method, action, endpoint, fun, schema) {
switch (fun.toLowerCase()) {
case "byorganization":
return this.unmap(schema);
default:
return winston.warn("no such fun", fun);
}
};
return BedsMapper;
})(Mapper);
exports.mapper = new BedsMapper();