projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
15921: Avoids adding a trailing slash to every resourceType.
[arvados-workbench2.git]
/
src
/
services
/
common-service
/
common-service.ts
diff --git
a/src/services/common-service/common-service.ts
b/src/services/common-service/common-service.ts
index 212f2f4d0305fbf36a54bce6393a16506ff2d005..1c1e0a569d7e485080fa6c9f934177b188c4fc27 100644
(file)
--- a/
src/services/common-service/common-service.ts
+++ b/
src/services/common-service/common-service.ts
@@
-38,7
+38,7
@@
export class CommonService<T> {
constructor(serverApi: AxiosInstance, resourceType: string, actions: ApiActions) {
this.serverApi = serverApi;
constructor(serverApi: AxiosInstance, resourceType: string, actions: ApiActions) {
this.serverApi = serverApi;
- this.resourceType = '/' + resourceType
+ '/'
;
+ this.resourceType = '/' + resourceType;
this.actions = actions;
}
this.actions = actions;
}
@@
-93,7
+93,7
@@
export class CommonService<T> {
delete(uuid: string): Promise<T> {
return CommonService.defaultResponse(
this.serverApi
delete(uuid: string): Promise<T> {
return CommonService.defaultResponse(
this.serverApi
- .delete(this.resourceType + uuid),
+ .delete(this.resourceType +
'/' +
uuid),
this.actions
);
}
this.actions
);
}
@@
-101,7
+101,7
@@
export class CommonService<T> {
get(uuid: string) {
return CommonService.defaultResponse(
this.serverApi
get(uuid: string) {
return CommonService.defaultResponse(
this.serverApi
- .get<T>(this.resourceType + uuid),
+ .get<T>(this.resourceType +
'/' +
uuid),
this.actions
);
}
this.actions
);
}
@@
-125,7
+125,7
@@
export class CommonService<T> {
update(uuid: string, data: Partial<T>) {
return CommonService.defaultResponse(
this.serverApi
update(uuid: string, data: Partial<T>) {
return CommonService.defaultResponse(
this.serverApi
- .put<T>(this.resourceType + uuid, data && CommonService.mapKeys(_.snakeCase)(data)),
+ .put<T>(this.resourceType +
'/' +
uuid, data && CommonService.mapKeys(_.snakeCase)(data)),
this.actions
);
}
this.actions
);
}