Skip to content

Commit 834a97f

Browse files
committed
rename contentprovider param
1 parent b27d6bf commit 834a97f

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

server/services/search.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ function search($service_integration, $dirty_query
114114
$res = $apiclient->call_api($endpoint . "/contentproviders", $payload);
115115
$res = $res["result"];
116116
$res = json_decode($res, true);
117-
$contentprovider_long = $res["contentprovider_long"];
118-
$post_params["contentprovider_long"] = $contentprovider_long;
119-
$param_types[] = "contentprovider_long";
117+
$repo_name = $res["repo_name"];
118+
$post_params["repo_name"] = $repo_name;
119+
$param_types[] = "repo_name";
120120
}
121121
$params_json = packParamsJSON($param_types, $post_params);
122122

server/workers/api/src/apis/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ def post(self):
7070
del params["optradio"]
7171
errors = search_param_schema.validate(params, partial=True)
7272
if "repo" in params:
73-
contentprovider_long = contentprovider_lookup.get(params["repo"])
74-
params["contentprovider_long"] = contentprovider_long
73+
repo_name = contentprovider_lookup.get(params["repo"])
74+
params["repo_name"] = repo_name
7575
params["limit"] = 120
7676
params["list_size"] = 100
7777
base_ns.logger.debug(errors)
@@ -116,14 +116,14 @@ def post(self):
116116
117117
returns: json
118118
{"contentprovider_short": "ftunivlausanne",
119-
"contentprovider_long": "Université de Lausanne (UNIL): Serval - Serveur académique lausannois"}
119+
"repo_name": "Université de Lausanne (UNIL): Serval - Serveur académique lausannois"}
120120
"""
121121
params = request.get_json()
122122
base_ns.logger.debug(params)
123123
if not params:
124124
result = contentprovider_lookup
125125
else:
126-
result = {"contentprovider_long": contentprovider_lookup.get(params["repo"])}
126+
result = {"repo_name": contentprovider_lookup.get(params["repo"])}
127127
try:
128128
headers = {}
129129
headers["Content-Type"] = "application/json"

server/workers/api/src/apis/request_validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class SearchParamSchema(Schema):
2222
raw = fields.Boolean()
2323
sg_method = fields.Str()
2424
repo = fields.Str()
25-
contentprovider_long = fields.Str()
25+
repo_name = fields.Str()
2626
coll = fields.Str()
2727
vis_id = fields.Str(default=None)
2828
optradio = fields.Str()

0 commit comments

Comments
 (0)