encapsulating in communication component + update js tests
This commit is contained in:
@ -36,36 +36,46 @@ define([
|
||||
return Module._cachedQuery({
|
||||
action: 'getTaxonomies',
|
||||
options: {
|
||||
postType: postType,
|
||||
},
|
||||
postType: postType
|
||||
}
|
||||
}).then(function(response) {
|
||||
return response.data;
|
||||
});
|
||||
};
|
||||
|
||||
Module.getTerms = function(options) {
|
||||
return Module._cachedQuery({
|
||||
action: 'getTerms',
|
||||
options: options,
|
||||
options: options
|
||||
}).then(function(response) {
|
||||
return response.data;
|
||||
});
|
||||
};
|
||||
|
||||
Module.getPosts = function(options) {
|
||||
return Module._cachedQuery({
|
||||
action: 'getPosts',
|
||||
options: options,
|
||||
options: options
|
||||
}).then(function(response) {
|
||||
return response.data;
|
||||
});
|
||||
};
|
||||
|
||||
Module.getTransformedPosts = function(options) {
|
||||
return Module._cachedQuery({
|
||||
action: 'getTransformedPosts',
|
||||
options: options,
|
||||
options: options
|
||||
}).then(function(response) {
|
||||
return response.data;
|
||||
});
|
||||
};
|
||||
|
||||
Module.getBulkTransformedPosts = function(options) {
|
||||
return Module._query({
|
||||
action: 'getBulkTransformedPosts',
|
||||
options: options,
|
||||
options: options
|
||||
}).then(function(response) {
|
||||
return response.data;
|
||||
});
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user