Add default values

This commit is contained in:
Piotr Rogowski 2022-01-09 18:39:10 +01:00
parent 34f8e79513
commit 89ad4cbc47
No known key found for this signature in database
GPG Key ID: 4A842D702D9C6F8F
1 changed files with 26 additions and 26 deletions

View File

@ -68,19 +68,19 @@ enum MaxFiles {
} }
interface TuneDataDetails { interface TuneDataDetails {
readme?: string; readme?: string | null;
make?: string; make?: string | null;
model?: string; model?: string | null;
displacement?: string; displacement?: string | null;
year?: number; year?: number | null;
hp?: number; hp?: number | null;
stockHp?: number; stockHp?: number | null;
engineCode?: string; engineCode?: string | null;
cylinders?: number; cylinders?: number | null;
aspiration?: string; aspiration?: string | null;
fuel?: string; fuel?: string | null;
injectors?: string; injectors?: string | null;
coils?: string; coils?: string | null;
} }
interface TuneDbData { interface TuneDbData {
@ -215,19 +215,19 @@ const UploadPage = () => {
isPublic, isPublic,
isListed, isListed,
details: { details: {
readme, readme: readme || null,
make, make: make || null,
model, model: model || null,
displacement, displacement: displacement || null,
year, year: year || null,
hp, hp: hp || null,
stockHp, stockHp: stockHp || null,
engineCode, engineCode: engineCode || null,
cylinders, cylinders: cylinders || null,
aspiration, aspiration: aspiration || null,
fuel, fuel: fuel || null,
injectors, injectors: injectors || null,
coils, coils: coils || null,
}, },
}); });
setIsPublished(true); setIsPublished(true);