posts: include id attribute in API.

This commit is contained in:
evazion
2022-10-10 06:27:59 -05:00
parent d3a5a60aec
commit a23c02d0cb

View File

@@ -91,7 +91,7 @@ class PostPolicy < ApplicationPolicy
attributes += [:has_large, :has_visible_children]
attributes += TagCategory.categories.map {|x| "tag_string_#{x}".to_sym}
attributes += [:file_url, :large_file_url, :preview_file_url] if visible?
attributes -= [:id, :md5] if !visible?
attributes -= [:md5] if !visible?
attributes
end