MCPcopy Index your code
hub / github.com/freeCodeCamp/freeCodeCamp / getUserProfile

Function getUserProfile

client/src/utils/ajax.ts:173–189  ·  view source on GitHub ↗
(
  username: string
)

Source from the content-addressed store, hash-verified

171 result: string | undefined;
172};
173export function getUserProfile(
174 username: string
175): Promise<ResponseWithData<User | null>> {
176 const responseWithData = get<UserProfileResponse>(
177 `/users/get-public-profile?username=${username}`
178 );
179 return responseWithData.then(({ response, data }) => {
180 const user = parseApiResponseToClientUser({
181 user: data.entities?.user ?? {},
182 result: data.result
183 });
184 return {
185 response,
186 data: user
187 };
188 });
189}
190
191interface Cert {
192 certTitle: string;

Callers

nothing calls this directly

Calls 2

getFunction · 0.85

Tested by

no test coverage detected