All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.app.core.services.info.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 { environment } from '@env/environment';
import { Observable } from 'rxjs';

@Injectable({
    providedIn: 'root'
})
export class InfoService {

    private url = '/api/v1/info';

    constructor(private http: HttpClient) {
    }

    public getVersion(): Observable {
        return this.http.get(environment.backend + this.url + '/build/version', {responseType: 'text'});
    }

    public getApplicationName(): Observable {
        return this.http.get(environment.backend + this.url + '/appname', {responseType: 'text'});
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy