Requesting development advice

Diego Fernandes 2 years ago

I have a scenario where a third party app will manage users and update their info using the API.
Currently I query all users, then pick the one I need from the array and update it.

I believe this is not good for performance when the list gets big, and a new endpoint for searching by email/username would be ideal.

Any advice/tips/ideas on how to code this new endpoint?

Anton Tananaev 2 years ago

Why can't you just get users by id? That's what we do in the official app.

Diego Fernandes 2 years ago

This external web app does not know the user id, only email.

I guess I could also build a backend service for this external app that connects to the same database to query user data. Is there a problem if I take this route? Don't wanna mess with the db data consistency

Anton Tananaev 2 years ago

I would definitely recommend using API to avoid caching problems.

Diego Fernandes 2 years ago

Makes sense. I'll have something like /API/users/email/{email} then. Should be fairly simple to implement in the UserResource class.