Skip to content

Commit

Permalink
remove debug outputs
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Cassidy <[email protected]>
  • Loading branch information
stevecassidy committed Aug 24, 2023
1 parent 37c2b94 commit 22884c5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
10 changes: 0 additions & 10 deletions src/data_storage/attachments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ export function file_data_to_attachments(
avp: AttributeValuePair
): Array<AttributeValuePair | FAIMSAttachment> {
if (avp.data === null) {
console.debug('No data in', avp);
return [avp];
}
console.debug('Attachments in avp', avp);

const docs_to_dump: Array<AttributeValuePair | FAIMSAttachment> = [];
const attach_refs: FAIMSAttachmentReference[] = [];
Expand Down Expand Up @@ -82,8 +80,6 @@ export function file_data_to_attachments(
};
}


console.log('attach_doc', attach_doc);
attach_refs.push({
attachment_id: attach_id,
filename: file_name,
Expand All @@ -93,7 +89,6 @@ export function file_data_to_attachments(
}
avp.data = null;
avp.faims_attachments = attach_refs;
console.debug('Encoded attachments in avp', avp);
docs_to_dump.push(avp);
return docs_to_dump;
}
Expand All @@ -107,18 +102,15 @@ export function files_to_attachments(files: File[]): FullAttachments {
data: file,
};
}
console.debug('Converted files to attachments', files, attachments);
return attachments;
}

export function attachment_to_file(
name: string,
attachment: PouchDB.Core.Attachment
): File {
console.debug('attachment?', attachment);
const content_type = attachment.content_type;
const data = (attachment as PouchDB.Core.FullAttachment).data;
console.debug('blob?', data);
return new File([data], name, {type: content_type});
}

Expand All @@ -129,7 +121,6 @@ export function attachments_to_files(
for (const [name, attach] of Object.entries(attachments)) {
attach_list.push(attachment_to_file(name, attach));
}
console.debug('Converted attachments to files', attachments, attach_list);
return attach_list;
}

Expand All @@ -154,7 +145,6 @@ export function file_attachments_to_data(
attach_list.push(possible_file);
}
}
console.debug('files?', attach_list);
avp.data = attach_list;
return avp;
}
3 changes: 0 additions & 3 deletions src/data_storage/internals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ export async function getHRID(
}
}

console.debug('hrid_name:', hrid_name);
if (hrid_name === null) {
console.warn('No HRID field found');
return null;
Expand All @@ -215,10 +214,8 @@ export async function getHRID(
console.warn('No HRID field set for revision');
return null;
}
console.debug('hrid_avp_id:', hrid_avp_id);
try {
const hrid_avp = await getAttributeValuePair(project_id, hrid_avp_id);
console.debug('hrid_avp:', hrid_avp);
return hrid_avp.data as string;
} catch (err) {
console.warn('Failed to load HRID AVP:', project_id, hrid_avp_id);
Expand Down

0 comments on commit 22884c5

Please sign in to comment.