(groupId: number)
| 96 | * Get group details by group ID |
| 97 | */ |
| 98 | export async function getGroup(groupId: number): Promise<Group> { |
| 99 | try { |
| 100 | const response = await fetchWithAuth( |
| 101 | API_ENDPOINTS.groups.detail(groupId), |
| 102 | { |
| 103 | method: "GET", |
| 104 | } |
| 105 | ); |
| 106 | |
| 107 | const result: GroupDetailResponse = await response.json(); |
| 108 | return result.data; |
| 109 | } catch (error) { |
| 110 | if (error instanceof ApiError) { |
| 111 | throw error; |
| 112 | } |
| 113 | throw new ApiError(500, "Failed to fetch group details"); |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | /** |
| 118 | * Get group members |
nothing calls this directly
no test coverage detected