kikuomax / hr-analysis

Personal HR analysis application for Fitbit
GNU General Public License v3.0
0 stars 0 forks source link

Data backup hook #1

Open kikuomax opened 6 years ago

kikuomax commented 6 years ago

How about to add a hook function to the arguments of the requestIntradayTimeSeries function? A hook function might look like,

async function hookFunction(userId, request, payload): void

where

It should not block so that requestIntradayTimeSeries can immediately return the results.

kikuomax commented 6 years ago

We might simplify the arguments as shown below,

async function hookFunction(request, payload): void

Because request.auth.credentials.userId will contain a user ID. See #2.

kikuomax commented 6 years ago

oops!