21 lines
744 B
TypeScript
21 lines
744 B
TypeScript
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
import { Injectable } from '@angular/core';
|
|
import { Observable } from 'rxjs';
|
|
import { ConfigurationService } from '../configuration/configuration.service';
|
|
import { BaseHttpService } from '../http/base-http.service';
|
|
|
|
@Injectable()
|
|
export class DepositRepositoriesService {
|
|
|
|
private actionUrl: string;
|
|
private headers = new HttpHeaders();
|
|
|
|
constructor(private http: BaseHttpService, private httpClient: HttpClient, private configurationService: ConfigurationService) {
|
|
this.actionUrl = configurationService.server + 'deposit/';
|
|
}
|
|
|
|
getAvailableRepos(): Observable<string[]> {
|
|
return this.http.get<string[]>(this.actionUrl + 'repos/', { headers: this.headers });
|
|
}
|
|
}
|