FeatureFuel
1

Retrieve list of users by ID

Source: supabase/supabase#39640 · opened by @jtrollkarl
I was curious if it would be possible to implement such a function? I've currently written

suspend fun AdminApi.retrieveUsersByIds(uids: List<String>): List<UserInfo> = coroutineScope { uids.map { uid -> async { retrieveUserById(uid) } }.awaitAll() }

but was curious if there would be a more efficient method instead of doing individual calls and waiting? I see in AdminApi there is:

override suspend fun retrieveUserById(uid: String): UserInfo { return api.get("admin/users/$uid").safeBody() }

I don't know if there currently exists an API function/path to achieve the behaviour i want (select multiple UserInfo objects by a list of IDs). My implementation is basically doing multiple calls to the admin/users/uidhere endpoint - but is it possible to request and receive a list?

Original feature request was posted in the kotlin wrapper library:

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests