🎨 fixed inconsinstent example code indentations (#749)

Some of the code examples used 2 spaces, and some were wrongly indented. This PR fixes the inconsistent JavaScript indentation to 4 spaces, and ensures that opening and closing brackets/braces are placed on the same indentation
This commit is contained in:
JannesD 2019-10-31 12:43:43 +01:00 committed by Stian Thorgersen
parent 73a9c8af1c
commit f3b2913ad3

View file

@ -467,11 +467,12 @@ For example:
[source,javascript]
----
keycloak.loadUserProfile().then(function(profile) {
alert(JSON.stringify(profile, null, " "));
}).catch(function() {
keycloak.loadUserProfile()
.then(function(profile) {
alert(JSON.stringify(profile, null, " "))
}).catch(function() {
alert('Failed to load user profile');
});
});
----
====== isTokenExpired(minValidity)
@ -489,15 +490,16 @@ For example:
[source,javascript]
----
keycloak.updateToken(5).then(function(refreshed) {
keycloak.updateToken(5)
.then(function(refreshed) {
if (refreshed) {
alert('Token was successfully refreshed');
} else {
alert('Token is still valid');
}
}).catch(function() {
}).catch(function() {
alert('Failed to refresh the token, or the session has expired');
});
});
----
====== clearToken()