src.app.core.services.jira-plugin-configuration.service.ts Maven / Gradle / Ivy
The newest version!
/*
* SPDX-FileCopyrightText: 2017-2024 Enedis
*
* SPDX-License-Identifier: Apache-2.0
*
*/
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { environment } from '@env/environment';
import { JiraPluginConfiguration } from '@core/model/jira-plugin-configuration.model';
@Injectable({
providedIn: 'root'
})
export class JiraPluginConfigurationService {
private url = '/api/ui/jira/v1/configuration';
constructor(private http: HttpClient) {
}
public get(): Observable {
return this.http.get(environment.backend + this.url);
}
public getUrl(): Observable {
return this.http.get(environment.backend + this.url + '/url', {responseType: 'text'});
}
public save(configuration: JiraPluginConfiguration): Observable {
return this.http.post(environment.backend + this.url, configuration, {responseType: 'text'});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy