j3k0 / ganomede-users

Ganomede Users
0 stars 0 forks source link

New admin endpoint GET /users/v1/reported-users #55

Closed j3k0 closed 2 years ago

j3k0 commented 3 years ago

The goal is to retrieve the list of highly reported users.

For this task, we first will need the Events /latest feature implemented: https://github.com/j3k0/ganomede-events/issues/31

The idea will be this:

  1. retrieve a large number of the last events in the "Events" database, channel users/v1/blocked-users. Maybe the last 10,000.
  2. Process this list to count the number of reports per user.
  3. For each reported user, check if he is banned (logic for this already part of ganomede-users).
  4. Sort descending, only returning users that are not banned.
j3k0 commented 2 years ago

Add a config for the number of events to process.