export default defineEventHandler(async (event) => { let teamId: string = event.context.params ? event.context.params.id : '@current' if (teamId === '@current') { const user = await getUser('@me', event) teamId = user.team._id.toString() } return await TeamModel.findById(teamId).populate('members') })