Closed oscgonfer closed 3 months ago
We will move to the users endpoint for the requests on the users kit page. See referenced issue by @timcowlishaw
@pral2a would you happen to know why we are asking for devices in this page?
I'm not sure if I'm getting the question fully. To fill the user profile with the devices owned by the user, we use /me
to obtain the devices list and then /devices/{id}
to load all the devices a user owns. Originally, we expected a max of 10 devices per user. However, right now, some users own a lot of devices, and the view crashes, causing issues and becoming useless for those users. I suggest to use pagination to reduce the number of requests to /devices/{id}
.
I'm not sure if I'm getting the question fully. To fill the user profile with the devices owned by the user, we use /me to obtain the devices list and then /devices/{id} to load all the devices a user owns.
Yes, so we think is that we can query directly the /users/{id}
endpoint to get all the information needed for the devices, as that endpoint provides already the information needed to populate the device-card. If we need something else, we can always change that api endpoint, but as I see it I think all is there.
Great! Please, ensure first how the end-point deals with private devices
This is an issue to add a search bar and a pagination to the kits page for large amounts of kits. This could allow us to avoid slow page loads in the view with large amount of kits. Now, a quick and dirty profiling gives 1.2s of request time to the /me endpoint, but much more for a larger request: