mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
21 lines
437 B
TypeScript
21 lines
437 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import { environment } from 'src/environments/environment';
|
|
import { HttpClient } from '@angular/common/http';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class ServerConnectionService {
|
|
|
|
constructor(private http: HttpClient,) { }
|
|
|
|
async BaseAPI(): Promise<boolean> {
|
|
try {
|
|
await this.http.get(environment.apiURL)
|
|
return true
|
|
} catch {
|
|
return false
|
|
}
|
|
}
|
|
}
|