Skip to content

Commit

Permalink
Views for private api were missing
Browse files Browse the repository at this point in the history
  • Loading branch information
pverscha committed Nov 16, 2022
1 parent 87e10f2 commit 3eb6e78
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/views/private_api/ecnumbers.json.jbuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
json.array! @ecnumbers do |ecnumber|
json.code ecnumber.code
json.name ecnumber.name
end
2 changes: 2 additions & 0 deletions app/views/private_api/error.json.jbuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
json.name @error_name
json.message @error_message
5 changes: 5 additions & 0 deletions app/views/private_api/goterms.json.jbuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
json.array! @goterms do |goterm|
json.code goterm.code
json.name goterm.name
json.namespace goterm.namespace
end
5 changes: 5 additions & 0 deletions app/views/private_api/interpros.json.jbuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
json.array! @interpros do |interpro|
json.code interpro.code
json.category interpro.category
json.name interpro.name
end
1 change: 1 addition & 0 deletions app/views/private_api/metadata.json.jbuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
json.db_version @data[:db_version]
10 changes: 10 additions & 0 deletions app/views/private_api/proteins.json.jbuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
json.lca @lca_taxon ? @lca_taxon.id : -1
json.common_lineage(@common_lineage.map(&:id))
json.proteins @entries do |entry|
json.uniprotAccessionId entry.uniprot_accession_number
json.name entry.name
json.organism entry.taxon_id
json.ecNumbers(entry.ec_cross_references.map(&:ec_number_code))
json.goTerms(entry.go_cross_references.map(&:go_term_code))
json.interproEntries(entry.interpro_cross_references.map(&:interpro_entry_code))
end
6 changes: 6 additions & 0 deletions app/views/private_api/taxa.json.jbuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
json.array! @taxa do |taxon|
json.id taxon.id
json.name taxon.name
json.rank taxon.rank
json.lineage(Lineage.ranks.map { |rank| taxon.lineage.send(rank) })
end

0 comments on commit 3eb6e78

Please sign in to comment.