projects
/
onyx-live.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4979cca
)
added ROOT_ENDPOINT to example endpoints
author
Brendan Hansen
<brendan.f.hansen@gmail.com>
Mon, 6 Sep 2021 12:31:04 +0000
(07:31 -0500)
committer
Brendan Hansen
<brendan.f.hansen@gmail.com>
Mon, 6 Sep 2021 12:31:04 +0000
(07:31 -0500)
static/src/index.js
patch
|
blob
|
history
diff --git
a/static/src/index.js
b/static/src/index.js
index b7bd57f132b247285d9b3c0478d8c541a342f671..62c7734f602b4a08c0aac5785e84df2652c6214b 100644
(file)
--- a/
static/src/index.js
+++ b/
static/src/index.js
@@
-231,7
+231,7
@@
function submit_input() {
}
function populate_examples() {
- fetch("/list_examples")
+ fetch(
ROOT_ENDPOINT +
"/list_examples")
.then(x => x.json())
.then(examples => {
let $selector = $("#examples-selector");
@@
-250,7
+250,7
@@
function load_example() {
let example = $selector.val();
if (example == "---") return;
- fetch(`/example?example=${example}`)
+ fetch(`
${ROOT_ENDPOINT}
/example?example=${example}`)
.then(x => x.text())
.then(text => {
let editor = ace.edit('code-editor');