mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Move function to a more logical location
This commit is contained in:
parent
5dfe327f8c
commit
28fb38bf0c
@ -45,6 +45,14 @@ const AccountInterface = {
|
|||||||
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
|
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current user email address
|
||||||
|
*/
|
||||||
|
getMail: async function() {
|
||||||
|
const res = await api("account/mail", null, true);
|
||||||
|
return res.mail;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether the security questions have been set for an account
|
* Check whether the security questions have been set for an account
|
||||||
* with an email address or not
|
* with an email address or not
|
||||||
|
@ -31,14 +31,6 @@ const SettingsInterface = {
|
|||||||
ComunicWeb.common.api.makeAPIrequest(apiURI, settings, true, callback);
|
ComunicWeb.common.api.makeAPIrequest(apiURI, settings, true, callback);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Get current user email address
|
|
||||||
*/
|
|
||||||
getMail: async function() {
|
|
||||||
const res = await api("account/mail", null, true);
|
|
||||||
return res.mail;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check the availability of the virtual directory for user
|
* Check the availability of the virtual directory for user
|
||||||
*
|
*
|
||||||
|
@ -66,7 +66,7 @@ ComunicWeb.pages.settings.sections.password = {
|
|||||||
let user = await userInfo(userID());
|
let user = await userInfo(userID());
|
||||||
newPasswordInput.setUser(user)
|
newPasswordInput.setUser(user)
|
||||||
|
|
||||||
let mail = await SettingsInterface.getMail()
|
let mail = await AccountInterface.getMail()
|
||||||
newPasswordInput.setEmail(mail)
|
newPasswordInput.setEmail(mail)
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user