Skip to content

Commit

Permalink
fix: targeted publishing services + tenant api url (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszrondio authored and takeit committed Jun 15, 2018
1 parent 891ec1d commit a1c2c75
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions client/extensions/targetedPublishing/TargetedPublishing.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ export class TargetedPublishing extends React.Component {
const subdomain = pubConfig.tenant ? `${pubConfig.tenant}.` : '';
const domainName = pubConfig.domain;

let service = item.anpa_category.map( item => {
return {
name: item.name,
code: item.qcode
};
});
let filteredItem = {
guid: item.guid,
language: item.language,
Expand All @@ -30,7 +36,8 @@ export class TargetedPublishing extends React.Component {
pubstatus: item.pubstatus,
authors: item.authors,
extra: item.extra,
source: item.source
source: item.source,
service: service
};

filteredItem = _(filteredItem).omitBy(_.isNil).omitBy(_.isEmpty).value();
Expand Down Expand Up @@ -73,7 +80,7 @@ export class TargetedPublishing extends React.Component {
}

getSites() {
return axios.get(this.state.apiUrl + 'tenants', {headers: this.state.apiHeader})
return axios.get(this.state.apiUrl + 'tenants/', {headers: this.state.apiHeader})
.then(res => {
this.setState({
sites: res.data._embedded._items
Expand Down

0 comments on commit a1c2c75

Please sign in to comment.