Skip to content
Snippets Groups Projects
Verified Commit 0c104658 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: missing callbacks

parent 81c5a208
No related branches found
No related tags found
No related merge requests found
...@@ -88,6 +88,10 @@ class RestAPI extends Datasource { ...@@ -88,6 +88,10 @@ class RestAPI extends Datasource {
transformer: undefined, transformer: undefined,
callbacks: [] callbacks: []
}, },
sheathing: {
object: undefined,
path: undefined,
},
report: { report: {
path: undefined path: undefined
} }
...@@ -149,6 +153,11 @@ class RestAPI extends Datasource { ...@@ -149,6 +153,11 @@ class RestAPI extends Datasource {
let transformation = self.getOption('read.mapping.transformer'); let transformation = self.getOption('read.mapping.transformer');
if (transformation !== undefined) { if (transformation !== undefined) {
const pipe = new Pipe(transformation); const pipe = new Pipe(transformation);
for (const callback of self.getOption('read.mapping.callbacks')) {
pipe.setCallback(callback.constructor.name, callback);
}
obj = pipe.run(obj); obj = pipe.run(obj);
} }
...@@ -177,6 +186,11 @@ class RestAPI extends Datasource { ...@@ -177,6 +186,11 @@ class RestAPI extends Datasource {
let transformation = self.getOption('write.mapping.transformer'); let transformation = self.getOption('write.mapping.transformer');
if (transformation !== undefined) { if (transformation !== undefined) {
const pipe = new Pipe(transformation); const pipe = new Pipe(transformation);
for (const callback of self.getOption('write.mapping.callbacks')) {
pipe.setCallback(callback.constructor.name, callback);
}
obj = pipe.run(obj); obj = pipe.run(obj);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment