fix type in buildPackages fn

This commit is contained in:
neil 2022-10-24 20:18:28 +08:00
parent 1a848708f7
commit 61fd5ed03e

View file

@ -39,6 +39,7 @@ interface FinalPackageOutput {
interface AirtablePackageDict {
[slug: string]: AirtablePackage
}
const getFinalPackagesData = async (s3Packages: S3Package[], airtablePackages: AirtablePackage[]): Promise<FinalPackageOutput> => {
const newPackages: NewAirtablePackage[] = [];
const packagesJson: Package[] = [];
@ -75,6 +76,7 @@ const getFinalPackagesData = async (s3Packages: S3Package[], airtablePackages: A
homepage,
desc,
installs: 0, // TODO: get from algolia
dl_count: 0,
thumb_image_url: '',
}
newPackages.push(newPackage);
@ -88,5 +90,4 @@ const getFinalPackagesData = async (s3Packages: S3Package[], airtablePackages: A
}
}
export const main = buildPackages;