Move Calculation off of Calculator
Opened this issue · 2 comments
cooper-roper commented
Description
We want to move complex logic off of the FE's and into the api, for better separation of concern and access to this logic.
This means we need to replicate the existing logic around the result calculation into the api. Create a service that performs this calculation (homeEnergy.service.js
).
Technical Notes
Move this logic, specifically handleCalculation
into the back end.
- Create Unit tests!
homeEnergy.service.test.js
- A stand-alone piece of logic/service
- DO NOT WIRE INTO ANY ENDPOINT (see below)
Risks
Related Issues Or Discussions
#30 Will be the continuation of this work to wire it together.
rgraue commented
Assume that any required material for the calculations will be a) passed in from user request b) lives in the database
codeexpert74 commented
Ok
…On Wed, May 22, 2024 at 10:50 AM Ryan Graue ***@***.***> wrote:
Assume that any required material for the calculations will be a) passed
in from user request b) lives in the database
—
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BHSYIXJ7XFXFSSP4SOGNGMLZDTLIDAVCNFSM6AAAAABHJ4UJBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRVGQZDANBWG4>
.
You are receiving this because you were assigned.Message ID:
<climate-cooperative/home-energy-assessment-database/issues/37/2125420467@
github.com>