fix types and default placeholder values

This commit is contained in:
neil 2022-10-20 08:53:27 +08:00
parent 201fc97544
commit c547eafe19
3 changed files with 66 additions and 65 deletions

View file

@ -25,6 +25,7 @@ export const getAllAirtablePackages = async () : Promise<AirtablePackage[]> => {
'last_modified',
'full_name',
]),
maintainer: record.fields?.maintainer || '',
desc: record.fields?.description || '',
thumb_image_url: _.get(record.fields, 'thumb_image[0].url', '/Images/package-thumb-nolabel3.jpg')
} as AirtablePackage;

View file

@ -1,6 +1,6 @@
import S3 from 'aws-sdk/clients/s3';
import { compareVersions, validate } from 'compare-versions';
import _ from 'lodash';
import type { S3Package } from './types';
const Bucket = process.env.AWS_DIST_BUCKET;