Commit 66d6ae95 authored by Sven Franck's avatar Sven Franck

removed "person" mapper

parent f04dfee5
......@@ -1029,62 +1029,6 @@
}).fail(util.error);
}
return (reply);
},
/**
* @method person
* @param {object} reply Object received from previous chain element
* @param {object} response Object object passed on to next element
**/
"person": function (reply) {
var config, property, props, pass = reply.pass;
if (storage) {
config = {
"url": storage.items.dict.url,
"type": "GET",
"xhrFields": {
"withCredentials": true
}
};
// access storage
return jIO.util.ajax(config)
.then(function(response) {
return jIO.util.ajax({
"url": util.parse(response.target.responseText)._links.me.href,
"xhrFields": {
"withCredentials": true
}
})
.then(function (answer) {
if (pass.config.initial_query === undefined) {
pass.config.initial_query = {};
}
for (property in pass.config.initial_query) {
if (pass.config.initial_query.hasOwnProperty(property)) {
delete pass.config.initial_query[property];
}
}
pass.config.initial_query.query = {
"_id": util.parse(answer.target.responseText)._relative_url
};
// pass hacked query back into chain
if (reply.response) {
return {
"response": util.parse(reply.response),
"pass": pass
};
}
return {
"pass": pass
}
}).fail(util.error);
}).fail(util.error);
}
return (reply);
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment