From df98563e2104b82b119c00a3cd83cd0dc1242d25 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 16 Jun 2017 14:32:15 +0200 Subject: Use typescript standard and lint all files --- .../src/app/+admin/friends/shared/friend.model.ts | 10 ++++---- .../app/+admin/friends/shared/friend.service.ts | 30 +++++++++++----------- client/src/app/+admin/friends/shared/index.ts | 4 +-- 3 files changed, 22 insertions(+), 22 deletions(-) (limited to 'client/src/app/+admin/friends/shared') diff --git a/client/src/app/+admin/friends/shared/friend.model.ts b/client/src/app/+admin/friends/shared/friend.model.ts index f72156d05..6950405b9 100644 --- a/client/src/app/+admin/friends/shared/friend.model.ts +++ b/client/src/app/+admin/friends/shared/friend.model.ts @@ -1,7 +1,7 @@ export interface Friend { - id: string; - host: string; - score: number; - email: string; - createdAt: Date; + id: string + host: string + score: number + email: string + createdAt: Date } diff --git a/client/src/app/+admin/friends/shared/friend.service.ts b/client/src/app/+admin/friends/shared/friend.service.ts index 6e51c954f..f4ecd36ad 100644 --- a/client/src/app/+admin/friends/shared/friend.service.ts +++ b/client/src/app/+admin/friends/shared/friend.service.ts @@ -1,39 +1,39 @@ -import { Injectable } from '@angular/core'; -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/operator/catch'; -import 'rxjs/add/operator/map'; +import { Injectable } from '@angular/core' +import { Observable } from 'rxjs/Observable' +import 'rxjs/add/operator/catch' +import 'rxjs/add/operator/map' -import { ServerDataSource } from 'ng2-smart-table'; +import { ServerDataSource } from 'ng2-smart-table' -import { Friend } from './friend.model'; -import { AuthHttp, RestExtractor, RestDataSource, ResultList } from '../../../shared'; +import { Friend } from './friend.model' +import { AuthHttp, RestExtractor, RestDataSource, ResultList } from '../../../shared' @Injectable() export class FriendService { - private static BASE_FRIEND_URL = API_URL + '/api/v1/pods/'; + private static BASE_FRIEND_URL = API_URL + '/api/v1/pods/' constructor ( private authHttp: AuthHttp, private restExtractor: RestExtractor ) {} - getDataSource() { - return new RestDataSource(this.authHttp, FriendService.BASE_FRIEND_URL); + getDataSource () { + return new RestDataSource(this.authHttp, FriendService.BASE_FRIEND_URL) } - makeFriends(notEmptyHosts) { + makeFriends (notEmptyHosts) { const body = { hosts: notEmptyHosts - }; + } return this.authHttp.post(FriendService.BASE_FRIEND_URL + 'makefriends', body) .map(this.restExtractor.extractDataBool) - .catch((res) => this.restExtractor.handleError(res)); + .catch((res) => this.restExtractor.handleError(res)) } - quitFriends() { + quitFriends () { return this.authHttp.get(FriendService.BASE_FRIEND_URL + 'quitfriends') .map(res => res.status) - .catch((res) => this.restExtractor.handleError(res)); + .catch((res) => this.restExtractor.handleError(res)) } } diff --git a/client/src/app/+admin/friends/shared/index.ts b/client/src/app/+admin/friends/shared/index.ts index 0d671637d..41aa6edd6 100644 --- a/client/src/app/+admin/friends/shared/index.ts +++ b/client/src/app/+admin/friends/shared/index.ts @@ -1,2 +1,2 @@ -export * from './friend.model'; -export * from './friend.service'; +export * from './friend.model' +export * from './friend.service' -- cgit v1.2.3