Is it possible to avoid making a water fall of these 2 calls to Supabase? It would be awesome to load the data in parallell.
export async function POST({ request }) {
const reqData = await request.json();
const userId = reqData.brukerRow.id;
const user = await supabaseClient.auth.admin.getUserById(userId);
const roles = await supabaseClient.from('payPhoneRoles')
.select('id, role_name')
.order('id', { ascending: true });
const returnObj = {
user: user.data.user,
availableRoles: roles.data
};
return json(returnObj, { status: 200 });
}