about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-11-04 12:10:25 +0100
committerThibG <thib@sitedethib.com>2018-11-28 14:46:07 +0100
commit06c7fb801518dda3451d8efc3dde17060378e576 (patch)
tree0a96b690a007c43e7d626797c9c060fb97d2870e
parent53d0293d259f3b4e8fcfd96aca33867c6af3dd50 (diff)
Add backend support to read and update list-specific show_replies settings
-rw-r--r--app/controllers/api/v1/lists_controller.rb2
-rw-r--r--app/serializers/rest/list_serializer.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/api/v1/lists_controller.rb b/app/controllers/api/v1/lists_controller.rb
index 054172bee..e5ac45fef 100644
--- a/app/controllers/api/v1/lists_controller.rb
+++ b/app/controllers/api/v1/lists_controller.rb
@@ -38,6 +38,6 @@ class Api::V1::ListsController < Api::BaseController
   end
 
   def list_params
-    params.permit(:title)
+    params.permit(:title, :replies_policy)
   end
 end
diff --git a/app/serializers/rest/list_serializer.rb b/app/serializers/rest/list_serializer.rb
index 977da7439..3e87f7119 100644
--- a/app/serializers/rest/list_serializer.rb
+++ b/app/serializers/rest/list_serializer.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 class REST::ListSerializer < ActiveModel::Serializer
-  attributes :id, :title
+  attributes :id, :title, :replies_policy
 
   def id
     object.id.to_s