Browse Source

Fix uncaught 500 error on invalid `replies_policy` (Fix #19097) (#20126)

closed-social-glitch-2
trwnh 2 years ago
committed by GitHub
parent
commit
68d9dcd425
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      app/controllers/api/v1/lists_controller.rb

+ 4
- 0
app/controllers/api/v1/lists_controller.rb View File

@ -7,6 +7,10 @@ class Api::V1::ListsController < Api::BaseController
before_action :require_user!
before_action :set_list, except: [:index, :create]
rescue_from ArgumentError do |e|
render json: { error: e.to_s }, status: 422
end
def index
@lists = List.where(account: current_account).all
render json: @lists, each_serializer: REST::ListSerializer

Loading…
Cancel
Save