Skip to content

Commit

Permalink
Specify required arguments in submit_detection
Browse files Browse the repository at this point in the history
  • Loading branch information
skanderm committed Aug 17, 2023
1 parent ffd2854 commit 4b3d9d2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions server/lib/orcasite/radio/detection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ defmodule Orcasite.Radio.Detection do
accept [:playlist_timestamp, :player_offset, :listener_count, :description]
argument :feed_id, :string, allow_nil?: false

argument :playlist_timestamp, :integer, allow_nil?: false
argument :player_offset, :decimal, allow_nil?: false
argument :listener_count, :integer, allow_nil?: false
argument :description, :string, allow_nil?: false

change set_attribute(:playlist_timestamp, arg(:playlist_timestamp))
change set_attribute(:player_offset, arg(:player_offset))
change set_attribute(:listener_count, arg(:listener_count))
change set_attribute(:description, arg(:description))

change manage_relationship(:feed_id, :feed, type: :append)
end
Expand Down

0 comments on commit 4b3d9d2

Please sign in to comment.