( userId: string, activity: PatchyActivity, now = new Date(), )
| 84 | parsePatchyDay(storageWrapper.getItem(storageKey(userId)), now); |
| 85 | |
| 86 | export const recordPatchyActivity = ( |
| 87 | userId: string, |
| 88 | activity: PatchyActivity, |
| 89 | now = new Date(), |
| 90 | ): PatchyDay => { |
| 91 | const next = addPatchyActivity(readPatchyDay(userId, now), activity, now); |
| 92 | storageWrapper.setItem(storageKey(userId), JSON.stringify(next)); |
| 93 | return next; |
| 94 | }; |
no test coverage detected