Hey I have this params arriving to my definition and I am calling it recording_params
:
%{
"challenge_id" => "2",
"path_to_recording" => %Plug.Upload{
content_type: "audio/mp4",
filename: "2_a_Mister X.mp4",
path: "/tmp/plug-1537/multipart-1537727280-384028641338291-1"
},
"user_id" => "5"
}
then I am trying to use it like this:
recordings =
get_recording_list_by_user_id_and_challenge_id(
recording_params.user_id,
recording_params.challenge_id
)
on this line recording_params.user_id
I am getting an erro that says:
(KeyError) key :user_id not found in: %{"challenge_id" => "2", "path_to_recording" => %Plug.Upload{content_t
ype: "audio/mp4", filename: "2_a_Mister X.mp4", path: "/tmp/plug-1537/multipart-1537727280-384028641338291-1"}, "us
er_id" => "5"}
why is that? and how can i fix it?