Skip to content

Commit 2c204b0

Browse files
committed
fix: update version to 1.0.4-alpha and adjust saveProfile parameters for extended profile handling
1 parent aea139a commit 2c204b0

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@edunext/frontend-component-extended-fields",
3-
"version": "1.0.3-alpha",
3+
"version": "1.0.4-alpha",
44
"description": "Site extended profile Plugincomponent utilizing Frontend Plugin Framework",
55
"main": "dist/index.js",
66
"repository": {

src/extended-profile/ExtendedProfileProvider.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ const ExtendedProfileFieldsProvider = ({ patchProfile, components, children }) =
2525
setEditingInput(fieldName);
2626
};
2727

28-
const handleSaveExtendedProfile = async (params) => {
29-
await patchProfile(params);
28+
const handleSaveExtendedProfile = async ({ username, params }) => {
29+
if (username) await patchProfile(username, params);
30+
else await patchProfile(params);
3031
};
3132

3233
const handleResetFormEdition = () => {

src/extended-profile/account-fields/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const AccountFields = ({ extendedProfileValues }) => {
3030
});
3131

3232
try {
33-
await saveProfile({ extendedProfile: newFields });
33+
await saveProfile({ params: { extendedProfile: newFields }});
3434
} catch (error) {
3535
handleChangeSaveState('error');
3636
} finally {

src/extended-profile/profile-fields/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const ProfileFields = ({ fetchProfile, extendedProfileValues }) => {
3131
});
3232

3333
try {
34-
await saveProfile(user.username, { extendedProfile: newFields });
34+
await saveProfile({ username:user.username, params: { extendedProfile: newFields }});
3535
fetchProfile(user.username);
3636
} catch (error) {
3737
handleChangeSaveState('error');

0 commit comments

Comments
 (0)