Remove usage of deprecated Promise.success()/error() in example (#15179)
References: -0362d3a430
-650f3a8367/adapters/oidc/js/dist/keycloak.d.ts (L283-L297)
Co-authored-by: Stian Thorgersen <stianst@gmail.com>
This commit is contained in:
parent
2267352b9e
commit
88b0e48e63
1 changed files with 5 additions and 5 deletions
|
@ -53,9 +53,9 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function loadProfile() {
|
function loadProfile() {
|
||||||
keycloak.loadUserProfile().success(function(profile) {
|
keycloak.loadUserProfile().then(function(profile) {
|
||||||
output(profile);
|
output(profile);
|
||||||
}).error(function() {
|
}).catch(function() {
|
||||||
output('Failed to load profile');
|
output('Failed to load profile');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -82,9 +82,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadUserInfo() {
|
function loadUserInfo() {
|
||||||
keycloak.loadUserInfo().success(function(userInfo) {
|
keycloak.loadUserInfo().then(function(userInfo) {
|
||||||
output(userInfo);
|
output(userInfo);
|
||||||
}).error(function() {
|
}).catch(function() {
|
||||||
output('Failed to load user info');
|
output('Failed to load user info');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue