openclimatefix / pv-site-api

Site specific API for PV forecasting
6 stars 11 forks source link

Create Enode linking endpoints #72

Open ericcccsliu opened 1 year ago

ericcccsliu commented 1 year ago

We need to create API endpoints to handle the process of directing a user to Enode's Link UI.

/enode/link

/enode/link-return

Here is the respective code for generating a link in our current repo:

https://github.com/openclimatefix/pv-sites-mobile/blob/0091e4d54503c872bf90e256eb12d7ae2bd9e454/lib/enode.ts#L70-L83

And here are those respective endpoints in our current repo:

https://github.com/openclimatefix/pv-sites-mobile/blob/0091e4d54503c872bf90e256eb12d7ae2bd9e454/pages/api/%5B...mockApiRoute%5D.ts#L103-L124