Skip to content

Commit

Permalink
ENG-1395 added correlation between assets when extracting contents;
Browse files Browse the repository at this point in the history
  • Loading branch information
ffleandro committed Oct 21, 2020
1 parent 743850f commit 9f5664d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/env-bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,12 @@ const componentResponseProcessor = {
asset: async (response, token) => {
const assets = response.data.payload;
const schema = {
'id': 'correlationCode',
'id': [{
key: 'correlationCode',
transform: function(id, source) {
return source.correlationCode !== undefined ? source.correlationCode : id;
}
}],
'type': 'type',
'name': 'name',
'description': 'description',
Expand Down Expand Up @@ -516,7 +521,12 @@ const resourceExtractorByType = {

const processContentAttribute = function(attribute) {
const resourceSchema = {
'id': 'id',
'id': [{
key: 'correlationCode',
transform: function(id, source) {
return source.correlationCode !== undefined ? source.correlationCode : id;
}
}],
'name': 'name',
'metadata': 'metadata',
}
Expand Down

0 comments on commit 9f5664d

Please sign in to comment.