Set url function to private.
This commit is contained in:
1 parent
dc30f38662
commit
0b0c771558
2 files changed
+3
-2
No files matched your search
@@ -12,13 +12,14 @@ export class AccountService {
|
|||||||
private http: HttpClient
|
private http: HttpClient
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
url(id?: Number): string {
|
private url(id?: Number): string {
|
||||||
if(id) {
|
if(id) {
|
||||||
return `/api/account/${id}`;
|
return `/api/account/${id}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return `/api/account`;
|
return `/api/account`;
|
||||||
}
|
}
|
||||||
|
|
||||||
query(): Observable<Account[]> {
|
query(): Observable<Account[]> {
|
||||||
return this.http.get<Account[]>(this.url());
|
return this.http.get<Account[]>(this.url());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export class OperationService {
|
|||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
url(id?: Number): string {
|
private url(id?: Number): string {
|
||||||
if(id) {
|
if(id) {
|
||||||
return `/api/operation/${id}`;
|
return `/api/operation/${id}`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user