Files
frontend-app-authn/src/progressive-profiling/data/api.ts
Jesus Balderrama 0d709d1565 feat: React Query migration (#1629)
Move from Redux to React Query across the board.
2026-03-05 13:46:05 -03:00

23 lines
532 B
TypeScript

import { getConfig } from '@edx/frontend-platform';
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';
const patchAccount = async (username, commitValues) => {
const requestConfig = {
headers: { 'Content-Type': 'application/merge-patch+json' },
};
await getAuthenticatedHttpClient()
.patch(
`${getConfig().LMS_BASE_URL}/api/user/v1/accounts/${username}`,
commitValues,
requestConfig,
)
.catch((error) => {
throw (error);
});
};
export {
patchAccount,
};