MCPcopy
hub / github.com/ModelEngine-Group/nexent / getUser

Function getUser

frontend/services/userService.ts:88–102  ·  view source on GitHub ↗
(userId: string)

Source from the content-addressed store, hash-verified

86 * Get user details by user ID
87 */
88export async function getUser(userId: string): Promise<User> {
89 try {
90 const response = await fetchWithAuth(API_ENDPOINTS.users.detail(userId), {
91 method: "GET",
92 });
93
94 const result: UserDetailResponse = await response.json();
95 return result.data;
96 } catch (error) {
97 if (error instanceof ApiError) {
98 throw error;
99 }
100 throw new ApiError(500, "Failed to fetch user details");
101 }
102}
103
104/**
105 * Update user information

Callers

nothing calls this directly

Calls 2

fetchWithAuthFunction · 0.90
jsonMethod · 0.45

Tested by

no test coverage detected