Fix user/deepl_account relation
This commit is contained in:
@ -20,6 +20,7 @@ defmodule OutlookWeb.DeeplAccountLive.FormComponent do
|
||||
phx-change="validate"
|
||||
phx-submit="save"
|
||||
>
|
||||
<.input field={{f, :user_id}} type="hidden" />
|
||||
<.input field={{f, :name}} type="text" label="name" />
|
||||
<.input field={{f, :description}} type="text" label="description" />
|
||||
<.input field={{f, :auth_key}} type="text" label="auth_key" />
|
||||
|
||||
@ -23,7 +23,7 @@ defmodule OutlookWeb.DeeplAccountLive.Index do
|
||||
defp apply_action(socket, :new, _params) do
|
||||
socket
|
||||
|> assign(:page_title, "New Deepl account")
|
||||
|> assign(:deepl_account, %DeeplAccount{})
|
||||
|> assign(:deepl_account, %DeeplAccount{user_id: socket.assigns.current_user})
|
||||
end
|
||||
|
||||
defp apply_action(socket, :index, _params) do
|
||||
|
||||
Reference in New Issue
Block a user