Skip to content

Commit

Permalink
update usage of changed API method getVocabulary
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaskikutis committed Jan 24, 2024
1 parent 035e13f commit 8eeee3e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions client/extensions/upload-iptc/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ const extension: IExtension = {
activate: (superdesk: ISuperdesk) => {
const result: IExtensionActivationResult = {
contributions: {
iptcMapping: (data, item: IArticle) => Promise.all([
superdesk.entities.vocabulary.getVocabulary(PHOTO_CAT_ID),
superdesk.entities.vocabulary.getVocabulary(PHOTO_SUPPCAT_ID),
]).then(([categories, supp_categories]: [Array<ISubject>, Array<ISubject>]) => {
iptcMapping: (data, item: IArticle) => {
const categories = superdesk.entities.vocabulary.getVocabulary(PHOTO_CAT_ID).items;
const supp_categories = superdesk.entities.vocabulary.getVocabulary(PHOTO_SUPPCAT_ID).items;

Object.assign(item, {
slugline: toString(data.ObjectName),
byline: toString(data['By-line']),
Expand Down Expand Up @@ -106,8 +106,8 @@ const extension: IExtension = {

console.debug('iptc', data, item);

return item;
}),
return Promise.resolve(item);
},
},
};

Expand Down

0 comments on commit 8eeee3e

Please sign in to comment.