Revision 50977
Added by Myrto Koukouli about 6 years ago
repository.service.ts | ||
---|---|---|
33 | 33 |
.catch(this.handleError); |
34 | 34 |
} |
35 | 35 |
|
36 |
updateInterface(interfaceInfo: RepositoryInterface): Observable<string> { |
|
37 |
let url = `${this.apiUrl}updateInterface`; |
|
38 |
console.log(`knocking on: ${url}`); |
|
39 |
console.log(`sending ${JSON.stringify(interfaceInfo)}`); |
|
40 |
httpOptions.withCredentials = true; |
|
41 |
return this.http.post(url,interfaceInfo,httpOptions) |
|
42 |
.map( res => res.status.toString()) |
|
43 |
.catch(this.handleError); |
|
44 |
} |
|
45 |
|
|
46 |
deleteInterface(id: string): Observable<string> { |
|
47 |
let url = `${this.apiUrl}deleteInterface/${id}`; |
|
48 |
console.log(`knocking on: ${url}`); |
|
49 |
httpOptions.withCredentials = true; |
|
50 |
return this.http.delete(url,httpOptions) |
|
51 |
.map( res => res.status.toString() ) |
|
52 |
.catch(this.handleError); |
|
53 |
} |
|
54 |
|
|
36 | 55 |
addRepository(datatype: string, newRepository: Repository): Observable<Repository> { |
37 | 56 |
let url = `${this.apiUrl}addRepository?datatype=${datatype}`; |
38 | 57 |
console.log(`knocking on: ${url}`); |
... | ... | |
43 | 62 |
.catch(this.handleError); |
44 | 63 |
} |
45 | 64 |
|
46 |
deleteInterface(id: string): Observable<string> {
|
|
47 |
let url = `${this.apiUrl}deleteInterface/${id}`;
|
|
65 |
updateRepository(repoInfo: Repository): Observable<string> {
|
|
66 |
let url = `${this.apiUrl}updateRepository`;
|
|
48 | 67 |
console.log(`knocking on: ${url}`); |
68 |
console.log(`sending ${JSON.stringify(repoInfo)}`); |
|
49 | 69 |
httpOptions.withCredentials = true; |
50 |
return this.http.delete(url,httpOptions)
|
|
51 |
.map( res => res.status.toString() )
|
|
70 |
return this.http.post(url,repoInfo,httpOptions)
|
|
71 |
.map( res => res.status.toString()) |
|
52 | 72 |
.catch(this.handleError); |
53 | 73 |
} |
54 | 74 |
|
Also available in: Unified diff
finalized sources register and update