Skip to content

Commit

Permalink
A few more hardcoded URLs replaced
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Jun 8, 2024
1 parent 64d15f4 commit bef684d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scholia/app/templates/author-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ <h4 class="my-0 font-weight-normal">Redirects</h4>
resolver: 'custom',
events: {
search: debounce((searchTerm, callback) => {
var url = "https://query.wikidata.org/sparql";
var url = "{{ sparql_endpoint }}";
var settings = {
data: {
query: `
Expand Down Expand Up @@ -211,7 +211,7 @@ <h4 class="my-0 font-weight-normal">Redirects</h4>
multiple: true,
ajax: {
delay: 300,
url: "https://query.wikidata.org/sparql",
url: "{{ sparql_endpoint }}",
data: function (params) {
let search_author = params.term
return {
Expand Down
4 changes: 2 additions & 2 deletions scholia/app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@
curationElement.classList.remove("d-none");

// this query opens the Wikidata item as a different aspect
var endpointUrl = 'https://query.wikidata.org/sparql';
var endpointUrl = '{{ sparql_endpoint }}';
if ("{{q2}}".length) {
var query = `
SELECT DISTINCT ?aspect
Expand Down Expand Up @@ -555,7 +555,7 @@
}
}).then(function () {
if ("{{q2}}".length) {
var endpointUrl = 'https://query.wikidata.org/sparql';
var endpointUrl = '{{ sparql_endpoint }}';
var query = "SELECT DISTINCT ?aspect WHERE {"
query += '{ [] wdt:P921 wd:{{ q }} . BIND("topic" AS ?aspect) } }';

Expand Down
2 changes: 1 addition & 1 deletion scholia/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ def omim_to_qs(omimID):
query = 'select ?disease where {{ ?disease wdt:P492 "{omimID}" }}'.format(
omimID=escape_string(omimID))

url = 'https://query.wikidata.org/sparql'
url = SPARQL_ENDPOINT
params = {'query': query, 'format': 'json'}
response = requests.get(url, params=params, headers=HEADERS)
data = response.json()
Expand Down

0 comments on commit bef684d

Please sign in to comment.