From 44aff8a0ae83af515fab1292f674453dfdfe9f2a Mon Sep 17 00:00:00 2001 From: Nathan LeRoy Date: Thu, 19 Sep 2024 09:56:46 -0400 Subject: [PATCH] hot fix for validator --- web/src/hooks/queries/useValidation.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/web/src/hooks/queries/useValidation.ts b/web/src/hooks/queries/useValidation.ts index f29a309c..a3fd5113 100644 --- a/web/src/hooks/queries/useValidation.ts +++ b/web/src/hooks/queries/useValidation.ts @@ -31,9 +31,12 @@ const runValidation = async (params: ValidationParams) => { // Schema things formData.append('schema', schema || ''); - formData.append('schema_file', params.schema_file || ''); - formData.append('schema_registry', schema_registry || ''); - + if (params.schema_file) { + formData.append('schema_file', params.schema_file); + } + if (schema_registry) { + formData.append('schema_registry', schema_registry || ''); + } const { data: result } = await axios.post(`${API_BASE}/eido/validate`, formData, { headers: { 'Content-Type': 'multipart/form-data',