about summary refs log tree commit diff
path: root/app/views/api/v1/statuses
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/api/v1/statuses')
-rw-r--r--app/views/api/v1/statuses/context.rabl15
-rw-r--r--app/views/api/v1/statuses/show.rabl2
2 files changed, 7 insertions, 10 deletions
diff --git a/app/views/api/v1/statuses/context.rabl b/app/views/api/v1/statuses/context.rabl
index e9176dc29..24fa40394 100644
--- a/app/views/api/v1/statuses/context.rabl
+++ b/app/views/api/v1/statuses/context.rabl
@@ -1,13 +1,10 @@
-object false
+object @context
+cache false
 
-node :ancestors do
-  @ancestors.map do |status|
-    partial('api/v1/statuses/show', object: status)
-  end
+node :ancestors do |context|
+  partial 'api/v1/statuses/index', object: context.ancestors
 end
 
-node :descendants do
-  @descendants.map do |status|
-    partial('api/v1/statuses/show', object: status)
-  end
+node :descendants do |context|
+  partial 'api/v1/statuses/index', object: context.descendants
 end
diff --git a/app/views/api/v1/statuses/show.rabl b/app/views/api/v1/statuses/show.rabl
index f78716e1b..24493bc3e 100644
--- a/app/views/api/v1/statuses/show.rabl
+++ b/app/views/api/v1/statuses/show.rabl
@@ -1,5 +1,5 @@
 object @status
-cache @status
+cache false
 
 extends 'api/v1/statuses/_show'