import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { Profile } from './models/profile.model'; import { Setting } from './models/setting.model'; @Injectable({ providedIn: 'root', }) export class SettingsService { constructor(private http: HttpClient) {} public get(): Observable { return this.http.get(`/Api/Settings`); } public update(settings: Setting[]): Observable { return this.http.put(`/Api/Settings`, { settings }); } public getProfile(): Observable { return this.http.get(`/Api/Settings/Profile`); } public testPath(path: string): Observable { return this.http.post(`/Api/Settings/TestPath`, { path }); } public testDownloadSpeed(): Observable { return this.http.get(`/Api/Settings/TestDownloadSpeed`); } public testWriteSpeed(): Observable { return this.http.get(`/Api/Settings/TestWriteSpeed`); } }