mirror of
https://github.com/ivabus/www
synced 2024-11-10 13:45:14 +03:00
fix types and default placeholder values
This commit is contained in:
parent
201fc97544
commit
c547eafe19
|
@ -6,7 +6,7 @@ import type { AirtablePackage } from './types';
|
|||
const airtablePackagesBase = base(process.env.AIRTABLE_PACKAGES_BASE);
|
||||
|
||||
|
||||
export const getAllAirtablePackages = async () : Promise<AirtablePackage[]> => {
|
||||
export const getAllAirtablePackages = async (): Promise<AirtablePackage[]> => {
|
||||
const allRecords = await airtablePackagesBase('packages')
|
||||
.select({
|
||||
maxRecords: 100,
|
||||
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue