about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-07-07 18:51:45 +0200
committerGitHub <noreply@github.com>2018-07-07 18:51:45 +0200
commit9804ec3a6df7f5fae00443d489eee663e32973da (patch)
tree1e2fce1663be8a295a0b650db8331b7f4f8fb530 /app
parentc24d62220d6d7db30e5c003987d7f7a74060b0a7 (diff)
Fix missing irreversible in filters API, expires_in param (#7976)
Diffstat (limited to 'app')
-rw-r--r--app/controllers/api/v1/filters_controller.rb2
-rw-r--r--app/serializers/rest/filter_serializer.rb3
2 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/api/v1/filters_controller.rb b/app/controllers/api/v1/filters_controller.rb
index 02efd323b..a98080d1d 100644
--- a/app/controllers/api/v1/filters_controller.rb
+++ b/app/controllers/api/v1/filters_controller.rb
@@ -43,6 +43,6 @@ class Api::V1::FiltersController < Api::BaseController
   end
 
   def resource_params
-    params.permit(:phrase, :expires_at, :irreversible, context: [])
+    params.permit(:phrase, :expires_in, :irreversible, context: [])
   end
 end
diff --git a/app/serializers/rest/filter_serializer.rb b/app/serializers/rest/filter_serializer.rb
index 07f2516f8..51340aa79 100644
--- a/app/serializers/rest/filter_serializer.rb
+++ b/app/serializers/rest/filter_serializer.rb
@@ -1,5 +1,6 @@
 # frozen_string_literal: true
 
 class REST::FilterSerializer < ActiveModel::Serializer
-  attributes :id, :phrase, :context, :expires_at
+  attributes :id, :phrase, :context, :expires_at,
+             :irreversible
 end