Skip to content

Conversation

@kelvin-muchiri
Copy link
Contributor

@kelvin-muchiri kelvin-muchiri commented Jul 28, 2025

Changes / Features implemented

Including all users in a project from endpoint api/v1/projects is causing slow response times for projects that have a large number of users. In addition, it increases the size of the response, which further increases the latency.

This change removes the users property in the project list endpoint and replaces it with current_user_role whose value is the role of the request user in the project. The users property is still available on endpoint /api/v1/projects/<id>

Steps taken to verify this change does what is intended

  • QA

Side effects of implementing this change

Faster responses when fetching list of projects

Before submitting this PR for review, please make sure you have:

  • Included tests
  • Updated documentation

Closes #

@kelvin-muchiri kelvin-muchiri marked this pull request as draft July 28, 2025 14:07
@FrankApiyo
Copy link
Member

@kelvin-muchiri, can you add a field that indicates the number of forms in a project? Also, would it be possible to check the role of the request.user in each project?

@kelvin-muchiri kelvin-muchiri changed the title Remove property users, forms from list of projects Remove property users from list of projects Jul 30, 2025
@kelvin-muchiri kelvin-muchiri force-pushed the remove-project-list-users-forms branch 2 times, most recently from 16189e5 to 1e9d93b Compare August 8, 2025 07:18
@kelvin-muchiri kelvin-muchiri force-pushed the remove-project-list-users-forms branch from 1e9d93b to b1a09d1 Compare September 25, 2025 10:23
@kelvin-muchiri kelvin-muchiri force-pushed the remove-project-list-users-forms branch from 0afcc2c to 20dfccc Compare September 29, 2025 06:20
@kelvin-muchiri kelvin-muchiri marked this pull request as ready for review September 29, 2025 07:21
Copy link
Member

@ukanga ukanga left a comment

Choose a reason for hiding this comment

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

Can we update the API documentation as well?

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.

4 participants