From b99929294cac036f4727380b664411dfa7f89ebe Mon Sep 17 00:00:00 2001 From: sshugsc Date: Wed, 13 Nov 2024 12:48:29 -0800 Subject: [PATCH] make cancer-type accept string --- app/routes/variantText/variantText.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/routes/variantText/variantText.js b/app/routes/variantText/variantText.js index 9c53a5c78..e8b3466bd 100644 --- a/app/routes/variantText/variantText.js +++ b/app/routes/variantText/variantText.js @@ -203,6 +203,10 @@ router.route('/') delete req.body.project; delete req.body.template; + if (typeof req.body.cancerType === 'string') { + req.body.cancerType = [req.body.cancerType]; + } + await validateAgainstSchema(createSchema, req.body); } catch (error) { const message = `Error while validating variant text create request ${error}`;