projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '19051-handle-quotes-in-search' into main
[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 ddaf2ab02fa5ee4e18d544158e42f7606339983c..f16a2024ad2c3a1775d4a5fb7e83f784e08554e4 100644
(file)
--- a/
src/services/common-service/common-service.ts
+++ b/
src/services/common-service/common-service.ts
@@
-117,7
+117,13
@@
export class CommonService<T> {
get(uuid: string, showErrors?: boolean, select?: string[], session?: Session) {
this.validateUuid(uuid);
get(uuid: string, showErrors?: boolean, select?: string[], session?: Session) {
this.validateUuid(uuid);
- const cfg: AxiosRequestConfig = {};
+ const cfg: AxiosRequestConfig = {
+ params: {
+ select: select
+ ? `[${select.map(snakeCase).map(s => `"${s}"`).join(',')}]`
+ : undefined
+ }
+ };
if (session) {
cfg.baseURL = session.baseUrl;
cfg.headers = { 'Authorization': 'Bearer ' + session.token };
if (session) {
cfg.baseURL = session.baseUrl;
cfg.headers = { 'Authorization': 'Bearer ' + session.token };
@@
-125,7
+131,7
@@
export class CommonService<T> {
return CommonService.defaultResponse(
this.serverApi
return CommonService.defaultResponse(
this.serverApi
- .get<T>(`/${this.resourceType}/${uuid}`,
session ? cfg : undefined
),
+ .get<T>(`/${this.resourceType}/${uuid}`,
cfg
),
this.actions,
true, // mapKeys
showErrors
this.actions,
true, // mapKeys
showErrors