Yicong-Huang commented on code in PR #6130:
URL: https://github.com/apache/texera/pull/6130#discussion_r3548028904
##########
frontend/src/app/workspace/service/virtual-environment/virtual-environment.service.ts:
##########
@@ -73,27 +74,27 @@ export class WorkflowPveService {
getSystemPackages(cuid: number): Observable<PackageResponse> {
const params = this.buildBaseParams().set("cuid", cuid.toString());
- return this.http.get<PackageResponse>("/pve/system", { params });
+ return
this.http.get<PackageResponse>(`${AppSettings.getApiEndpoint()}/pve/system`, {
params });
}
fetchPVEs(cuid: number): Observable<PvePackageResponse[]> {
const params = this.buildBaseParams().set("cuid", cuid.toString());
- return this.http.get<PvePackageResponse[]>("/pve/pves", { params });
+ return
this.http.get<PvePackageResponse[]>(`${AppSettings.getApiEndpoint()}/pve/pves`,
{ params });
}
getUserPackages(cuid: number, pveName: string): Observable<string[]> {
return this.fetchPVEs(cuid).pipe(map(pves => pves.find(pve => pve.pveName
=== pveName)?.userPackages ?? []));
}
deleteEnvironments(cuid: number) {
- return this.http.delete(`/pve/pves/${cuid}`);
+ return
this.http.delete(`${AppSettings.getApiEndpoint()}/pve/pves/${cuid}`);
Review Comment:
same for this, `/pve/pves` what dose it do? the naming is not self-contained
##########
frontend/src/app/workspace/service/virtual-environment/virtual-environment.service.spec.ts:
##########
@@ -45,7 +46,7 @@ describe("WorkflowPveService", () => {
expect(resp.veid).toBe(42);
});
- const req = httpTestingController.expectOne("/pve/db");
+ const req =
httpTestingController.expectOne(`${AppSettings.getApiEndpoint()}/pve/db`);
Review Comment:
`/pve/db` is just too bad of name choice: by reading the api, I don't know
what operation it is conducting. we should refactor it separately
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]