Skip to content

Make API return infraction list with newest first#249

Merged
jchristgit merged 2 commits into
masterfrom
infractions-default-ordering
Sep 20, 2019
Merged

Make API return infraction list with newest first#249
jchristgit merged 2 commits into
masterfrom
infractions-default-ordering

Conversation

@SebastiaanZ
Copy link
Copy Markdown
Contributor

The most recent infraction a user has is usually the most relevant to us. This PR aims to make the life of moderators easier by sorting the infractions by their inserted_at date, with the most recently inserted infractions first.

Note: The id field does not have an entirely chronological order, because we did not import historical infractions in chronological order. That's why the inserted_at field is chosen instead of the id field.

The most recent infraction a user has is usually the most relevant to
us. This PR aims to make our life easier by sorting the infractions by
their `inserted_at` date, with the most recent insertion date first.

Note: The `id` is not entirely in chronological order, because we did
not import historical infractions in chronological order. That's why
the `inserted_at` field is specified instead of the `id` field.
Copy link
Copy Markdown
Contributor

@scragly scragly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Copy link
Copy Markdown
Contributor

@jchristgit jchristgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit:

@jchristgit jchristgit merged commit 7c47ba7 into master Sep 20, 2019
@jchristgit
Copy link
Copy Markdown
Contributor

Thanks!

@jchristgit jchristgit deleted the infractions-default-ordering branch September 20, 2019 22:01
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

Successfully merging this pull request may close these issues.

3 participants