Skip to content

Commit 3463ed5

Browse files
committed
Filter out non-project.json params
1 parent 2192a3c commit 3463ed5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/controllers/api/scratch/projects_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ def show
1212
end
1313

1414
def update
15-
@project.scratch_component.content = params
15+
scratch_content = params.permit!.slice(:meta, :targets, :monitors, :extensions)
16+
@project.scratch_component&.content = scratch_content.to_unsafe_h
1617
@project.save!
1718
render json: { status: 'ok' }, status: :ok
1819
end

0 commit comments

Comments
 (0)