Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock server sends notifications with incorrect creation time. #21

Open
xxphantom opened this issue Oct 1, 2021 · 0 comments
Open

Mock server sends notifications with incorrect creation time. #21

xxphantom opened this issue Oct 1, 2021 · 0 comments

Comments

@xxphantom
Copy link

The request handler for receiving notifications does not process the "since" parameter:

rest.get('/fakeApi/notifications', (req, res, ctx) => {
const numNotifications = getRandomInt(1, 5)
let notifications = generateRandomNotifications(
undefined,
numNotifications,
db
)
return res(ctx.delay(ARTIFICIAL_DELAY_MS), ctx.json(notifications))
}),

Attention to line 211:

As a result, in Redux Essentials, Part 6 notifications with an incorrect creation time are received.

New notifications appear lower in the list:

image

Maybe I didn't understand something, but it seems to me that it should not be so.
I fixed it with the following code:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant