Skip to content

Commit 9af44a1

Browse files
committed
new functions
1 parent 91daf8c commit 9af44a1

File tree

1 file changed

+22
-0
lines changed
  • services/static-webserver/client/source/class/osparc/auth

1 file changed

+22
-0
lines changed

services/static-webserver/client/source/class/osparc/auth/Manager.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,28 @@ qx.Class.define("osparc.auth.Manager", {
116116
return osparc.data.Resources.fetch("auth", "resendCode", params);
117117
},
118118

119+
updatePhoneNumber: function(newPhoneNumber) {
120+
const params = {
121+
data: {
122+
phone: newPhoneNumber
123+
}
124+
};
125+
return osparc.data.Resources.fetch("profile", "phoneRegister", params);
126+
},
127+
128+
validateCodeUpdatePhone: function(code, loginCbk, failCbk, context) {
129+
const params = {
130+
data: {
131+
code
132+
}
133+
};
134+
osparc.data.Resources.fetch("profile", "phoneConfirm", params)
135+
.then(data => {
136+
loginCbk.call(context, data);
137+
})
138+
.catch(err => failCbk.call(context, err.message));
139+
},
140+
119141
isLoggedIn: function() {
120142
return osparc.auth.Data.getInstance().isLoggedIn();
121143
},

0 commit comments

Comments
 (0)