Skip to content
Snippets Groups Projects
Commit 0a31d890 authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

...

parent 9e573be9
No related branches found
No related tags found
No related merge requests found
// Rolf Niepraschk, 2018-01-12, Rolf.Niepraschk@ptb.de // Rolf Niepraschk, 2018-01-24, Rolf.Niepraschk@ptb.de
function(head, req) { function(head, req) {
var mainDocName = req.query.schema, mainDoc, docs = {}, key = '', row; var mainDocName = req.query.schema, mainDoc, docs = {}, key = '', row;
...@@ -7,7 +7,7 @@ function(head, req) { ...@@ -7,7 +7,7 @@ function(head, req) {
send(JSON.stringify(err) + '\n'); send(JSON.stringify(err) + '\n');
} }
function getBracedVariable(s) {// "{{ foo }}" --> "foo", "bar" --> false function getBracedVariable(s) {// "{{ foo }}" --> "foo", "foo" --> false
var re = /{{\s?([^}]*)\s?}}/, var re = /{{\s?([^}]*)\s?}}/,
x = typeof s == 'string' ? s.match(re) : false; x = typeof s == 'string' ? s.match(re) : false;
return x ? x[1] : x; return x ? x[1] : x;
...@@ -16,8 +16,6 @@ function(head, req) { ...@@ -16,8 +16,6 @@ function(head, req) {
function getReplacement(key, type, p1) { function getReplacement(key, type, p1) {
// Liefert Datenstruktur je nach key, type und ggf. subtype // Liefert Datenstruktur je nach key, type und ggf. subtype
var obj = docs[key], ret = false, src; var obj = docs[key], ret = false, src;
///send(key + ' *** ' + type + ' *** ' + p1 + '\n');
///send(JSON.stringify(obj) + '\n');
if (obj) { if (obj) {
switch (type) { switch (type) {
case 'ENUM': case 'ENUM':
......
// Rolf Niepraschk, 2018-01-24, Rolf.Niepraschk@ptb.de
function(doc) { function(doc) {
if (doc._id.indexOf('000_') == 0 || doc.Customer.Sign) { if (doc._id.indexOf('000_') == 0 || doc.Customer.Sign) {
emit(null, doc); emit(null, doc);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment