({
userId,
sendView,
now = new Date(),
}: DrainStreakViewQueueProps)
| 143 | // Replays the views queued for this user, oldest first, and resolves with how |
| 144 | // many the API accepted. |
| 145 | export const drainStreakViewQueue = ({ |
| 146 | userId, |
| 147 | sendView, |
| 148 | now = new Date(), |
| 149 | }: DrainStreakViewQueueProps): Promise<number> => |
| 150 | sendQueuedViews( |
| 151 | readStreakViewQueue().filter((view) => view.userId === userId), |
| 152 | sendView, |
| 153 | now, |
| 154 | ); |
no test coverage detected