Compare commits

...

2 Commits

Author SHA1 Message Date
Matt Jankowski
e905b40c0f
Merge 2d95c85c8b into 624c024766 2025-09-03 10:05:12 +00:00
Matt Jankowski
2d95c85c8b Avoid return not_found... in api/web/embeds 2025-08-29 10:12:09 -04:00

View File

@ -4,10 +4,9 @@ class Api::Web::EmbedsController < Api::Web::BaseController
include Authorization
before_action :set_status
before_action :verify_embed_allowed
def show
return not_found if @status.hidden?
if @status.local?
render json: @status, serializer: OEmbedSerializer
else
@ -27,6 +26,12 @@ class Api::Web::EmbedsController < Api::Web::BaseController
end
end
private
def verify_embed_allowed
not_found if @status.hidden?
end
def set_status
@status = Status.find(params[:id])
authorize @status, :show?