about summary refs log tree commit diff
path: root/app/views/api
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-09-16 00:21:51 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-09-16 00:21:51 +0200
commit5b0cef9781af519a0a6ace1f429162ae05863bde (patch)
treec7429316fa50f003451f2999ff30cc90c6506021 /app/views/api
parent2e7aac793ace0e938e45cb54ff601afa5d872214 (diff)
Setting up preliminary "detailed" routes in the UI, new API end-point for fetching status context
Diffstat (limited to 'app/views/api')
-rw-r--r--app/views/api/statuses/context.rabl13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/views/api/statuses/context.rabl b/app/views/api/statuses/context.rabl
new file mode 100644
index 000000000..71aff690d
--- /dev/null
+++ b/app/views/api/statuses/context.rabl
@@ -0,0 +1,13 @@
+object false
+
+node :ancestors do
+  @ancestors.map do |status|
+    partial('api/statuses/show', object: status)
+  end
+end
+
+node :descendants do
+  @descendants.map do |status|
+    partial('api/statuses/show', object: status)
+  end
+end