From aeedb6d2e3cac37c1d64c0f0dc926c299213bd4d Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Wed, 25 May 2022 13:23:46 -0500 Subject: [PATCH] Add sampleNames to kind list summary --- helpers/api/kind.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/helpers/api/kind.js b/helpers/api/kind.js index 55a6137..f1ff919 100644 --- a/helpers/api/kind.js +++ b/helpers/api/kind.js @@ -10,6 +10,9 @@ import { PaginatedList, defaultPerPage } from '~/helpers/api/pagination.js' +import { + makeSummaryOfListings +} from '~/helpers/categories.js' function makeKindEndpoint ({ kindSlug, number = null }) { if ( number ) { @@ -45,7 +48,10 @@ export class KindList extends PaginatedList { makeSummary () { // console.log( `Summary run ${ timeSummaryRun += 1 } times` ) - return getListSummaryNumbers( this.list ) + return { + ...getListSummaryNumbers( this.list ), + sampleNames: makeSummaryOfListings({ list: this.list }) + } } summary = this.makeSummary()