Skip to content

Commit 813ac3f

Browse files
committed
Fixes
1 parent f8fcacb commit 813ac3f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

app.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,26 +124,23 @@ def logout():
124124
response.delete_cookie('username')
125125
return response
126126

127-
def lhost():
128-
return urlparse(request.host).path.split(':')[0]
129-
130127
@app.route('/toSparql', methods=['GET', 'POST'])
131128
def toSparql():
132129
'''Call sparql UI service'''
133-
return redirect(f'http://{lhost()}:8000/sparql') #OK
130+
return redirect(f'http://localhost:8000/sparql') #OK
134131

135132
@app.route('/toAPI', methods=['GET', 'POST'])
136133
def toAPI():
137134
'''Call sparql UI service'''
138-
return redirect(f'http://{lhost()}:5020') #OK
135+
return redirect(f'http://localhost:5020') #OK
139136

140137
@app.route('/convert_lido', methods=['POST'])
141138
def convert_lido():
142139
''''Convert LIDO XML to RDF using the external service'''
143140
# curl -X POST -H "Content-Type: application/json" -d '{"data":"<lido/>", "format":"nt"}' converter:5000/runMappings
144141
data = request.json['data']
145142
logger.info(f'Converting Lido data ({len(data)} bytes)')
146-
return requests.post(f'http://{lhost()}:5000/convert', data=data).text
143+
return requests.post(f'http://converter:5000/convert', data=data).text
147144

148145

149146
@app.route('/import_ttl', methods=['POST'])

0 commit comments

Comments
 (0)