Skip to content

Commit

Permalink
remove logs
Browse files Browse the repository at this point in the history
  • Loading branch information
elzadj committed Jun 20, 2024
1 parent 8a0428d commit 8cde64c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
20 changes: 0 additions & 20 deletions src/extensions/DC/getDCEntity.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,8 @@ const getDCEntity = async (dataRequest, clientId) => {
accumulator,
} = dataRequest;

console.log('getDCEntity starts');
console.log('dataRequest', dataRequest);
console.log('relation', relation);

const contentError = getDCErrors(type, error, show, relation);

console.log('contentError', contentError);

if (contentError) return contentError;

const customPostTypes = select(
Expand Down Expand Up @@ -129,17 +123,6 @@ const getDCEntity = async (dataRequest, clientId) => {
if (orderTypes.includes(type) && orderRelations.includes(relation)) {
const relationKeyForId = getRelationKeyForId(relation, type);

console.log('getKind(type)', getKind(type));
console.log('nameDictionary[type]', nameDictionary[type]);
console.log('type', type);
console.log('per_page', accumulator + 1);
console.log('order', order);
console.log(
'getDCOrder(relation, orderBy)',
getDCOrder(relation, orderBy)
);
console.log('relationKeyForId', relationKeyForId);
console.log('id', id);
const entities = await resolveSelect('core').getEntityRecords(
getKind(type),
nameDictionary[type] ?? type,
Expand All @@ -151,9 +134,6 @@ const getDCEntity = async (dataRequest, clientId) => {
...(relationKeyForId && { [relationKeyForId]: id }),
}
);
console.log('entities', entities);
console.log('entities?.at(-1)', entities?.at(-1));
console.log('=====================');

return entities?.at(-1);
}
Expand Down
3 changes: 0 additions & 3 deletions src/extensions/DC/getDCMedia.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,8 @@ const getMediaById = async (id, type) => {
};

const getDCMedia = async (dataRequest, clientId) => {
console.log('dataRequest', dataRequest);
const data = await getDCEntity(dataRequest, clientId);

console.log('data', data);
if (!data) return null;

const { field, source, type } = dataRequest;
Expand All @@ -104,7 +102,6 @@ const getDCMedia = async (dataRequest, clientId) => {
}

if (['posts', 'pages'].includes(type) && field === 'author_avatar') {
console.log('data for author_avatar', data);
const { author: authorId } = data;
const { getUser } = resolveSelect('core');

Expand Down

0 comments on commit 8cde64c

Please sign in to comment.