Skip to content

Commit b27d6bf

Browse files
committed
fixed integration with persistence
1 parent 504fd8c commit b27d6bf

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

server/services/search.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,15 @@ function search($service_integration, $dirty_query
109109
}
110110
$unique_id = ($precomputed_id === null)?($unique_id):($precomputed_id);
111111
$post_params["vis_id"] = $unique_id;
112+
if (array_key_exists("repo", $post_params)) {
113+
$payload = json_encode(array("repo" => $post_params["repo"]));
114+
$res = $apiclient->call_api($endpoint . "/contentproviders", $payload);
115+
$res = $res["result"];
116+
$res = json_decode($res, true);
117+
$contentprovider_long = $res["contentprovider_long"];
118+
$post_params["contentprovider_long"] = $contentprovider_long;
119+
$param_types[] = "contentprovider_long";
120+
}
112121
$params_json = packParamsJSON($param_types, $post_params);
113122

114123
if($retrieve_cached_map) {

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,14 @@ class ContentProvider(Resource):
112112
def post(self):
113113
"""
114114
params: can be empty
115-
content_provider: BASE internal name, e.g. "fthsaugsburg"
115+
content_provider: BASE internal name, e.g. "ftunivlausanne"
116116
117117
returns: json
118-
{"contentprovider_short": "fthsaugsburg",
119-
"contentprovider_long": "OPUS - Publikationsserver der Hochschule Augsburg"}
118+
{"contentprovider_short": "ftunivlausanne",
119+
"contentprovider_long": "Université de Lausanne (UNIL): Serval - Serveur académique lausannois"}
120120
"""
121121
params = request.get_json()
122+
base_ns.logger.debug(params)
122123
if not params:
123124
result = contentprovider_lookup
124125
else:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class SearchParamSchema(Schema):
2222
raw = fields.Boolean()
2323
sg_method = fields.Str()
2424
repo = fields.Str()
25+
contentprovider_long = fields.Str()
2526
coll = fields.Str()
2627
vis_id = fields.Str(default=None)
2728
optradio = fields.Str()

0 commit comments

Comments
 (0)