Add JSON response format to entropy endpoints (#2673)

* Add JSON response format to entropy endpoints

Add account settings JSON endpoint returning account info including auto_postpone_period. Add auto_postpone_period to board JSON responses. Add JSON update support to both account and board entropy controllers.

* Add auto_postpone_period to all board response examples in API docs

* Use auto_postpone_period_in_days in JSON responses and API docs

* Use valid period values in permission tests
This commit is contained in:
Rob Zolkos
2026-03-10 11:31:00 -04:00
committed by GitHub
parent 1cf0406d81
commit 8c2318e267
11 changed files with 143 additions and 21 deletions
@@ -41,14 +41,14 @@ class FlatJsonParamsTest < ActionDispatch::IntegrationTest
put board_entropy_path(board), params: { auto_postpone_period_in_days: 90 }, as: :json
assert_response :no_content
assert_response :success
assert_equal 90.days, board.entropy.reload.auto_postpone_period
end
test "update account entropy with flat JSON" do
put account_entropy_path, params: { auto_postpone_period_in_days: 7 }, as: :json
assert_response :no_content
assert_response :success
assert_equal 7.days, Current.account.entropy.reload.auto_postpone_period
end