Skip to content

Commit

Permalink
added variant uid in publish logger msg
Browse files Browse the repository at this point in the history
  • Loading branch information
aman19K committed May 27, 2024
1 parent 2da78b5 commit 2de7464
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ export default class VariantEntries extends VariantAdapter<VariantHttpClient<Imp
reject: onReject.bind(this),
resolve: onSuccess.bind(this),
log: log,
variantUid
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@ export class VariantHttpClient<C> extends AdapterHelper<C, HttpClient> implement
options: PublishVariantEntryOptions,
apiParams: Record<string, any>,
) {
const { reject, resolve, log } = apiParams;
const { reject, resolve, log, variantUid } = apiParams;
const { entry_uid, content_type_uid } = options;
let endpoint = `content_types/${content_type_uid}/entries/${entry_uid}/publish`;

const onSuccess = (response: any) =>
resolve({ response, apiData: { entryUid: entry_uid, variantUid: input.entry.variants[0].uid }, log });
resolve({ response, apiData: { entryUid: entry_uid, variantUid }, log });
const onReject = (error: any) =>
reject({
error,
apiData: { entryUid: entry_uid, variantUid: input.entry.variants[0].uid },
apiData: { entryUid: entry_uid, variantUid },
log,
});

Expand Down

0 comments on commit 2de7464

Please sign in to comment.