Skip to content

Commit 835fc65

Browse files
iamshobhrajrtibbles
authored andcommitted
removed existing vuex methods
1 parent 77f8db6 commit 835fc65

File tree

1 file changed

+21
-0
lines changed
  • kolibri/core/assets/src/state/modules/core

1 file changed

+21
-0
lines changed

kolibri/core/assets/src/state/modules/core/actions.js

+21
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,27 @@ export function handleApiError(store, { error, reloadOnReconnect = false } = {})
6767
throw error;
6868
}
6969

70+
/**
71+
* Sets a password that is currently not specified
72+
* due to an account that was created while passwords
73+
* were not required.
74+
*
75+
* @param {object} store The store.
76+
* @param {object} sessionPayload The session payload.
77+
*/
78+
export function kolibriSetUnspecifiedPassword(store, { username, password, facility }) {
79+
const data = {
80+
username,
81+
password,
82+
facility,
83+
};
84+
return client({
85+
url: urls['kolibri:core:setnonspecifiedpassword'](),
86+
data,
87+
method: 'post',
88+
});
89+
}
90+
7091
const _setPageVisibility = debounce((store, visibility) => {
7192
store.commit('CORE_SET_PAGE_VISIBILITY', visibility);
7293
}, 500);

0 commit comments

Comments
 (0)