// Process entire note into a usable object public processNote(note: any): any { const processedNote: any = { uuid: note.uuid, modified: note.modified, title: note.title, }; if (note.content) { processedNote.content = this.contentMarkdownParser.render(note.content); processedNote.excerpt = excerpt(processedNote.content); } if (note.keywords) { processedNote.keywords = note.keywords; } if (note.assignee) { processedNote.assignee = note.assignee; } if (note.ui) { processedNote.ui = note.ui; } if (note.visibility) { if (note.visibility.path) processedNote.path = note.visibility.path; if (note.visibility.published) processedNote.published = note.visibility.published; if (note.visibility.shortId) processedNote.shortId = note.visibility.shortId; } return processedNote; }
public processOwner(owner: any): any { const processedOwner: any = { handle: owner.handle, ui: owner.ui, displayName: owner.displayName, format: owner.format, type: owner.type, blacklisted: owner.blacklisted, shortId: owner.shortId, }; if (owner.content) { processedOwner.content = this.contentMarkdownParser.render(owner.content); processedOwner.excerpt = excerpt(processedOwner.content); } return processedOwner; }