Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
fix(lint): fix tslint findings
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuawilson committed Mar 6, 2017
1 parent 42e5a94 commit ce65aec
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/app/auth/authentication.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class AuthenticationService {
isLoggedIn(): boolean {
let token = localStorage.getItem('auth_token');
if (token) {
if(!this.clearTimeoutId) {
if (!this.clearTimeoutId) {
this.setupRefreshTimer(15);
}
return true;
Expand Down Expand Up @@ -64,7 +64,7 @@ export class AuthenticationService {
let headers = new Headers({'Content-Type': 'application/json'});
let refreshTokenUrl = this.apiUrl + 'login/refresh';
let refreshToken = localStorage.getItem('refresh_token');
let body = JSON.stringify({"refresh_token": refreshToken});
let body = JSON.stringify({'refresh_token': refreshToken});
this.http.post(refreshTokenUrl, body, headers)
.map((response: Response) => {
let responseJson = response.json();
Expand All @@ -77,7 +77,7 @@ export class AuthenticationService {
}
}

processTokenResponse(response: any): Token {
processTokenResponse( response: any ): Token {
let token = response as Token;
localStorage.setItem('auth_token', token.access_token);
localStorage.setItem('refresh_token', token.refresh_token);
Expand Down
13 changes: 11 additions & 2 deletions src/app/shared/http.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import { Injectable, Inject, forwardRef } from '@angular/core';
import { Http, XHRBackend, RequestOptions, Request, RequestOptionsArgs, Response, Headers } from '@angular/http';
import {
Headers,
Http,
Response,
RequestOptions,
Request,
RequestOptionsArgs,
XHRBackend
} from '@angular/http';

import { Observable} from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';
Expand Down Expand Up @@ -39,7 +48,7 @@ export class HttpService extends Http {
return (res: Response) => {
if (res.status === 401 || res.status === 403) {
this.broadcaster.broadcast('authenticationError', res);
} else if(res.status === 500) {
} else if (res.status === 500) {
this.broadcaster.broadcast('communicationError', res);
}
return Observable.throw(res);
Expand Down
2 changes: 1 addition & 1 deletion src/app/user/alm-user-name.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ export class AlmUserName implements PipeTransform {
}
return '';
}
}
}
2 changes: 1 addition & 1 deletion src/app/user/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export class User implements Entity {
type: string;
links?: {
self: string;
}
};
}
2 changes: 1 addition & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
],
"max-line-length": [
true,
100
120
],
"no-require-imports": false,
"no-trailing-whitespace": true,
Expand Down

0 comments on commit ce65aec

Please sign in to comment.