UNPKG

glutenfree

Version:

A profiler/loganalyzer for nginx/Cetrea Aw.

22 lines (17 loc) 652 B
Mapper = require("../Mapper.js").mapper class PatientsMapper extends Mapper constructor: -> @identifier = "patients" schema: (method, action, endpoint, fun, args) -> switch fun.toLowerCase() when "listtasksforinboundpt" @map(["Organization.Id"], args) # one argument, organization id when "ptlistbyorgandtask" @map(["Organization.Id","Task.Id"], args) applySchema: (method, action, endpoint, fun, schema) -> switch fun.toLowerCase() when "listtasksforinboundpt", "ptlistbyorgandtask" @unmap(schema) else winston.warn "no such fun", fun exports.mapper = new PatientsMapper()