Skip to content

Commit

Permalink
ran linter
Browse files Browse the repository at this point in the history
  • Loading branch information
roncodes committed Sep 10, 2024
1 parent fa1e1d4 commit 332e595
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 113 deletions.
24 changes: 12 additions & 12 deletions addon/services/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class SessionService extends SimpleAuthSessionService {
*
* @return {SessionService}
*/
isOnboarding () {
isOnboarding() {
this._isOnboarding = true;

return this;
Expand All @@ -39,7 +39,7 @@ export default class SessionService extends SimpleAuthSessionService {
/**
* Manually authenticate user
*/
manuallyAuthenticate (authToken) {
manuallyAuthenticate(authToken) {
return this.session._setup('authenticator:fleetbase', { token: authToken }, true);
}

Expand All @@ -48,7 +48,7 @@ export default class SessionService extends SimpleAuthSessionService {
*
* @void
*/
async handleAuthentication () {
async handleAuthentication() {
if (this._isOnboarding) {
return;
}
Expand Down Expand Up @@ -81,7 +81,7 @@ export default class SessionService extends SimpleAuthSessionService {
*
* @void
*/
async loadCurrentUser () {
async loadCurrentUser() {
try {
const user = await this.currentUser.load();

Expand All @@ -101,7 +101,7 @@ export default class SessionService extends SimpleAuthSessionService {
* @param {Transition} transition
* @void
*/
async promiseCurrentUser (transition = null) {
async promiseCurrentUser(transition = null) {
const invalidateWithLoader = this.invalidateWithLoader.bind(this);

try {
Expand Down Expand Up @@ -132,7 +132,7 @@ export default class SessionService extends SimpleAuthSessionService {
* @param {String} loadingMessage
* @return {HTMLElement} loader
*/
showLoader (loadingMessage) {
showLoader(loadingMessage) {
const loader = document.createElement('div');
loader.classList.add('overloader');
loader.innerHTML = `<div class="flex items-center justify-center">
Expand All @@ -154,7 +154,7 @@ export default class SessionService extends SimpleAuthSessionService {
* @param {String} loadingMessage
* @return {Promise}
*/
invalidateWithLoader (loadingMessage = 'Ending session...') {
invalidateWithLoader(loadingMessage = 'Ending session...') {
// if loader node is open already just invalidate
if (this.isLoaderNodeOpen === true) {
return this.session.invalidate();
Expand All @@ -180,7 +180,7 @@ export default class SessionService extends SimpleAuthSessionService {
*
* @void
*/
setRedirect (whereTo = 'console') {
setRedirect(whereTo = 'console') {
this.redirectTo = whereTo;
}

Expand All @@ -189,7 +189,7 @@ export default class SessionService extends SimpleAuthSessionService {
*
* @return {Date}
*/
getExpiresAtDate () {
getExpiresAtDate() {
return new Date(this.data.authenticated.expires_at);
}

Expand All @@ -198,7 +198,7 @@ export default class SessionService extends SimpleAuthSessionService {
*
* @return {Integer}
*/
getSessionSecondsRemaining () {
getSessionSecondsRemaining() {
const date = this.getExpiresAtDate();
const now = new Date();

Expand All @@ -212,8 +212,8 @@ export default class SessionService extends SimpleAuthSessionService {
* @return {Promise}
* @throws {Error}
*/
checkForTwoFactor (identity) {
return this.fetch.get('two-fa/check', { identity }).catch(error => {
checkForTwoFactor(identity) {
return this.fetch.get('two-fa/check', { identity }).catch((error) => {
throw new Error(error.message);
});
}
Expand Down
Loading

0 comments on commit 332e595

Please sign in to comment.