From e2a2d6c86c7ca39074fdff3b545947d1d58dc008 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sat, 4 Mar 2017 11:45:47 +0100 Subject: Client: check token valitidy at startup --- client/src/app/account/account.service.ts | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 client/src/app/account/account.service.ts (limited to 'client/src/app/account/account.service.ts') diff --git a/client/src/app/account/account.service.ts b/client/src/app/account/account.service.ts deleted file mode 100644 index 046690347..000000000 --- a/client/src/app/account/account.service.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Injectable } from '@angular/core'; -import 'rxjs/add/operator/catch'; -import 'rxjs/add/operator/map'; - -import { AuthService } from '../core'; -import { AuthHttp, RestExtractor } from '../shared'; - -@Injectable() -export class AccountService { - private static BASE_USERS_URL = '/api/v1/users/'; - - constructor( - private authHttp: AuthHttp, - private authService: AuthService, - private restExtractor: RestExtractor - ) {} - - changePassword(newPassword: string) { - const url = AccountService.BASE_USERS_URL + this.authService.getUser().id; - const body = { - password: newPassword - }; - - return this.authHttp.put(url, body) - .map(this.restExtractor.extractDataBool) - .catch((res) => this.restExtractor.handleError(res)); - } -} -- cgit v1.2.3