(input: {
projectId: string;
groupId: string;
memberLimit?: number;
})
| 371 | } |
| 372 | |
| 373 | export async function getGroupCore(input: { |
| 374 | projectId: string; |
| 375 | groupId: string; |
| 376 | memberLimit?: number; |
| 377 | }) { |
| 378 | const [group, members] = await Promise.all([ |
| 379 | getGroupById(input.groupId, input.projectId), |
| 380 | getGroupMemberProfiles({ |
| 381 | projectId: input.projectId, |
| 382 | groupId: input.groupId, |
| 383 | take: input.memberLimit ?? 10, |
| 384 | }), |
| 385 | ]); |
| 386 | |
| 387 | if (!group) { |
| 388 | throw new Error(`Group not found: ${input.groupId}`); |
| 389 | } |
| 390 | |
| 391 | return { |
| 392 | group, |
| 393 | member_count: members.count, |
| 394 | members: members.data, |
| 395 | }; |
| 396 | } |
no test coverage detected