From 7efcaed733101f28d9f5b5fa0af79435f40557be Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Sun, 8 Oct 2023 00:59:14 +0200 Subject: [PATCH] update indentation --- .../app/model/network/network.service.ts | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/frontend/app/model/network/network.service.ts b/src/frontend/app/model/network/network.service.ts index dc0ae2f6..4a51dc6c 100644 --- a/src/frontend/app/model/network/network.service.ts +++ b/src/frontend/app/model/network/network.service.ts @@ -7,7 +7,7 @@ import {Config} from '../../../../common/config/public/Config'; import {Utils} from '../../../../common/Utils'; import {CustomHeaders} from '../../../../common/CustomHeaders'; import {VersionService} from '../version.service'; -import { lastValueFrom } from 'rxjs'; +import {lastValueFrom} from 'rxjs'; @Injectable() export class NetworkService { @@ -15,9 +15,9 @@ export class NetworkService { private globalErrorHandlers: Array<(error: ErrorDTO) => boolean> = []; constructor( - private http: HttpClient, - private loadingBarService: LoadingBarService, - private versionService: VersionService + private http: HttpClient, + private loadingBarService: LoadingBarService, + private versionService: VersionService ) { } @@ -52,9 +52,9 @@ export class NetworkService { }; return lastValueFrom(this.http - .get(this.apiBaseUrl + url, {responseType: 'text'})) - .then(process) - .catch(err); + .get(this.apiBaseUrl + url, {responseType: 'text'})) + .then(process) + .catch(err); } public getText(url: string): Promise { @@ -71,9 +71,9 @@ export class NetworkService { }; return lastValueFrom(this.http - .get(this.apiBaseUrl + url, {responseType: 'text'})) - .then(process) - .catch(err); + .get(this.apiBaseUrl + url, {responseType: 'text'})) + .then(process) + .catch(err); } public postJson(url: string, data = {}): Promise { @@ -97,9 +97,9 @@ export class NetworkService { } private callJson( - method: 'get' | 'post' | 'delete' | 'put', - url: string, - data = {} + method: 'get' | 'post' | 'delete' | 'put', + url: string, + data = {} ): Promise { const body = data; @@ -110,7 +110,7 @@ export class NetworkService { const msg = res.body; if (res.headers.has(CustomHeaders.dataVersion)) { this.versionService.onNewVersion( - res.headers.get(CustomHeaders.dataVersion) + res.headers.get(CustomHeaders.dataVersion) ); } if (msg.error) { @@ -130,26 +130,26 @@ export class NetworkService { switch (method) { case 'get': return lastValueFrom(this.http - .get>(this.apiBaseUrl + url, {observe: 'response'})) - .then(process) - .catch(err); + .get>(this.apiBaseUrl + url, {observe: 'response'})) + .then(process) + .catch(err); case 'delete': return lastValueFrom(this.http - .delete>(this.apiBaseUrl + url, {observe: 'response'})) - .then(process) - .catch(err); + .delete>(this.apiBaseUrl + url, {observe: 'response'})) + .then(process) + .catch(err); case 'post': return lastValueFrom(this.http - .post>(this.apiBaseUrl + url, body, { - observe: 'response', - })) - .then(process) - .catch(err); + .post>(this.apiBaseUrl + url, body, { + observe: 'response', + })) + .then(process) + .catch(err); case 'put': return lastValueFrom(this.http - .put>(this.apiBaseUrl + url, body, {observe: 'response'})) - .then(process) - .catch(err); + .put>(this.apiBaseUrl + url, body, {observe: 'response'})) + .then(process) + .catch(err); default: throw new Error('Unknown method'); }