[ARVADOS-WORKBENCH2] updated: 1.1.4-177-gc63ba40
Git user
git at public.curoverse.com
Mon Jul 2 10:16:24 EDT 2018
Summary of changes:
src/common/api/common-resource-service.ts | 12 ++++++------
src/services/groups-service/groups-service.ts | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
via c63ba4011d124c9efee4e4f1cd6568d4eb8a8d23 (commit)
from 306f9c9aeaaed5178a934be3265bd65b52d9e841 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit c63ba4011d124c9efee4e4f1cd6568d4eb8a8d23
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Mon Jul 2 16:16:10 2018 +0200
Apply fixes according to code review comments
Feature #13702
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/common/api/common-resource-service.ts b/src/common/api/common-resource-service.ts
index e49d2a0..93fc000 100644
--- a/src/common/api/common-resource-service.ts
+++ b/src/common/api/common-resource-service.ts
@@ -39,9 +39,6 @@ export interface ListResults<T> {
export default class CommonResourceService<T extends Resource> {
- serverApi: AxiosInstance;
- resourceType: string;
-
static mapResponseKeys = (response: any): Promise<any> =>
CommonResourceService.mapKeys(_.camelCase)(response.data)
@@ -63,9 +60,12 @@ export default class CommonResourceService<T extends Resource> {
}
}
+ protected serverApi: AxiosInstance;
+ protected resourceType: string;
+
constructor(serverApi: AxiosInstance, resourceType: string) {
this.serverApi = serverApi;
- this.resourceType = "/" + resourceType;
+ this.resourceType = '/' + resourceType + '/';
}
create() {
@@ -74,13 +74,13 @@ export default class CommonResourceService<T extends Resource> {
delete(uuid: string): Promise<T> {
return this.serverApi
- .delete(this.resourceType + "/" + uuid)
+ .delete(this.resourceType + uuid)
.then(CommonResourceService.mapResponseKeys);
}
get(uuid: string) {
return this.serverApi
- .get<T>(this.resourceType + "/" + uuid)
+ .get<T>(this.resourceType + uuid)
.then(CommonResourceService.mapResponseKeys);
}
diff --git a/src/services/groups-service/groups-service.ts b/src/services/groups-service/groups-service.ts
index 9016714..f230c70 100644
--- a/src/services/groups-service/groups-service.ts
+++ b/src/services/groups-service/groups-service.ts
@@ -41,7 +41,7 @@ export default class GroupsService extends CommonResourceService<GroupResource>
order: order ? order.get() : undefined
};
return this.serverApi
- .get(this.resourceType + `/${uuid}/contents`, {
+ .get(this.resourceType + `${uuid}/contents/`, {
params: CommonResourceService.mapKeys(_.snakeCase)(params)
})
.then(CommonResourceService.mapResponseKeys);
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list