Skip to content

Mock server sends notifications with incorrect creation time. #21

@xxphantom

Description

@xxphantom

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions