Commit 191075f1 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

Use backend route for kegg details

parent da010ccf
Pipeline #18563 passed with stages
in 2 minutes and 27 seconds
......@@ -150,7 +150,7 @@ export default {
this.request_done = true;
return;
}
axios.get('http://togows.org/entry/kegg-orthology/' + this.kegg_id + '.json', {
axios.get('/api/catalog/v1/functions/' + this.kegg_id + '?detailed=true', {
headers: {
Accept: 'application/json',
},
......@@ -171,16 +171,16 @@ export default {
this.kegg_details = [
{
title: 'ID',
content: response.data[0].entry_id,
url: 'https://www.genome.jp/dbget-bin/www_bget?ko:' + response.data[0].entry_id,
content: response.data.entry_id,
url: 'https://www.genome.jp/dbget-bin/www_bget?ko:' + response.data.entry_id,
},
{
title: 'Name',
content: response.data[0].name,
content: response.data.name,
},
{
title: 'Definition',
content: response.data[0].definition,
content: response.data.definition,
},
];
},
......@@ -195,7 +195,7 @@ export default {
title: 'Pathways',
content: [],
}
Object.entries(response.data[0].pathways).forEach(([key,value])=>{
Object.entries(response.data.pathways).forEach(([key,value])=>{
pathways.content.push(
{
id: key,
......@@ -211,7 +211,7 @@ export default {
title: 'Diseases',
content: [],
}
Object.entries(response.data[0].diseases).forEach(([key,value])=>{
Object.entries(response.data.diseases).forEach(([key,value])=>{
diseases.content.push(
{
id: key,
......@@ -223,12 +223,12 @@ export default {
return diseases;
},
buildReferences(response) {
for (var i=0; i < response.data[0].references.length; i++) {
for (var i=0; i < response.data.references.length; i++) {
this.kegg_references.push(
{
title: response.data[0].references[i].title,
authors: response.data[0].references[i].authors[0] + ' et al. ' + response.data[0].references[i].journal,
url: 'https://www.ncbi.nlm.nih.gov/pubmed/' + response.data[0].references[i].pubmed,
title: response.data.references[i].title,
authors: response.data.references[i].authors[0] + ' et al. ' + response.data.references[i].journal,
url: 'https://www.ncbi.nlm.nih.gov/pubmed/' + response.data.references[i].pubmed,
}
);
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment