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

Commit

Permalink
fix(version): update code to compile based on new typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuawilson committed Aug 25, 2017
1 parent ad80f34 commit d082bee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/auth/authentication.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable, Inject } from '@angular/core';
import { Http, Response, Headers, RequestOptions } from '@angular/http';
import { Http, Response, Headers, RequestOptions, RequestOptionsArgs } from '@angular/http';

import { Observable, Subject } from 'rxjs';
import { Broadcaster } from 'ngx-base';
Expand Down Expand Up @@ -112,10 +112,11 @@ export class AuthenticationService {
refreshToken() {
if (this.isLoggedIn()) {
let headers = new Headers({ 'Content-Type': 'application/json' });
let options: RequestOptions = new RequestOptions({ headers: headers });
let refreshTokenUrl = this.apiUrl + 'login/refresh';
let refreshToken = localStorage.getItem('refresh_token');
let body = JSON.stringify({ 'refresh_token': refreshToken });
this.http.post(refreshTokenUrl, body, headers)
this.http.post(refreshTokenUrl, body, options)
.map((response: Response) => {
let responseJson = response.json();
let token = this.processTokenResponse(responseJson.token);
Expand Down

0 comments on commit d082bee

Please sign in to comment.