Skip to content

Commit

Permalink
feat: updated all slug data url
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-hd committed Oct 9, 2024
1 parent 885d20d commit c9ff9ba
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions helpers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,10 @@ def retrieve_native_land_all_slug_data() -> dict:
Does request to obtain all NLD slug data list
which includes the groups of coordinates for each slug
"""
url = ('https://raw.githubusercontent.com/biocodellc/'
'localcontexts_json/main/data/'
'nativeland_slug_coordinates_description_list.json')
url = (
'https://raw.githubusercontent.com/biocodellc/'
'localcontexts_json/refs/heads/main/data/'
'nativeland_slug_coordinates_description_dict.json'
)
response = requests.get(url)
return response.json()
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
* */
try {
// do post call to get boundary
const url = `https://native-land.ca/wp-json/nativeland/v1/api/index.php?maps=territories&name=${slug}`
const url = `{% url 'nld-data' %}?slug=${slug}`
showSpinner()
const boundaryResponse = await fetch(url)
const boundaryData = await boundaryResponse.json()
Expand Down
2 changes: 1 addition & 1 deletion templates/communities/add-community-boundary.html
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ <h2 class="mt-0">Search the Native Land Digital database</h2>
const href = document.querySelector('#community-boundary-continue-btn').getAttribute('href')
const slug = document.querySelector('#selected-title').getAttribute('data-slug')

const url = `{% url 'nld-data' %}/${slug}`
const url = `{% url 'nld-data' %}?slug=${slug}`
const boundaryResponse = await fetch(url)
const boundaryData = await boundaryResponse.json()
document.querySelector("#community-boundary-continue-btn .fa-spinner").classList.remove("spinner-container");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
* */
try {
// do post call to get boundary
const url = `https://native-land.ca/wp-json/nativeland/v1/api/index.php?maps=territories&name=${slug}`
const url = `{% url 'nld-data' %}?slug=${slug}`
showSpinner()
const boundaryResponse = await fetch(url)
const boundaryData = await boundaryResponse.json()
Expand Down

0 comments on commit c9ff9ba

Please sign in to comment.