Skip to content
Snippets Groups Projects
Commit 3ad8498a authored by Burak Hançerli's avatar Burak Hançerli :headphones:
Browse files

QDS-11236 Demo projects endpoint

parent 07de8ed6
No related branches found
Tags 0.8.42
1 merge request!11QDS-11236 Demo projects endpoint
Pipeline #65190 failed
......@@ -118,13 +118,13 @@ function listExamples() {
request.responseType = "json";
request.onload = function (oEvent) {
var json = request.response;
if (json.projects.length > 0) {
if (json.length > 0) {
var projectsmenulist = document.querySelector("#projectsmenulist");
for (project in json.projects) {
for (project in json) {
var li = document.createElement("li");
var a = document.createElement("a");
var filename = json.projects[project].file;
a.setAttribute("href", "#" + filename);
var filename = json[project].name;
a.setAttribute("href", "#demos/" + filename);
a.innerHTML = filename;
li.appendChild(a);
projectsmenulist.appendChild(li);
......@@ -132,7 +132,7 @@ function listExamples() {
projectsmenu.style.display = "block";
}
};
request.open("GET", "resources/meta-data/qmlprojects.json", true);
request.open("GET", "api/v1/demos", true);
request.send(null);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment