Skip to content
Snippets Groups Projects
Commit fb533707 authored by esikkala's avatar esikkala
Browse files

Fix sparql result handling

parent acdf7456
No related branches found
No related tags found
No related merge requests found
......@@ -28,15 +28,11 @@ class SparqlApi {
})
.then(res => {
if (res.ok) { // res.status >= 200 && res.status < 300
return res;
return resolve(res.text());
} else {
return reject(res.statusText);
}
})
.then(res => res.text())
.then(data => {
return resolve(data);
})
.catch(err => console.log(err));
});
}
......
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