Skip to content

Commit

Permalink
nitweb: fix linearization responses
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Terrasa <[email protected]>
  • Loading branch information
Morriar committed Aug 31, 2016
1 parent d5bdcc9 commit 73d0dc1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion share/nitweb/views/classdef.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ul class='nav nav-tabs' role='tablist'>
<ul class='nav nav-tabs' ng-init='entityCtrl.loadEntityLinearization()'>
<li role='presentation' class='warning'>
<a ng-href='{{mentity.mclass.web_url}}'>
<span class='glyphicon glyphicon-chevron-left'/> Go to class
Expand Down
2 changes: 1 addition & 1 deletion share/nitweb/views/propdef.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ul class='nav nav-tabs'>
<ul class='nav nav-tabs' ng-init='entityCtrl.loadEntityLinearization()'>
<li role='presentation' class='warning'>
<a href='{{mentity.mproperty.web_url}}'>
<span class='glyphicon glyphicon-chevron-left'/> Go to property
Expand Down
4 changes: 3 additions & 1 deletion src/web/api_model.nit
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ class APIEntityLinearization
res.api_error(404, "No linearization for mentity `{mentity.full_name}`")
return
end
res.json new JsonArray.from(lin)
var mentities = new JsonArray
for e in lin do mentities.add e.full_json
res.json mentities
end
end

Expand Down

0 comments on commit 73d0dc1

Please sign in to comment.