Skip to content
Snippets Groups Projects
Commit c43f414a authored by Karen Konou's avatar Karen Konou
Browse files

Somehow fixed the repo insert [skip-ci]

parent 7e3ec93e
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,8 @@ defmodule Pleroma.Web.ThreadMute do
def add_mute(user, id) do
%{data: %{"context" => context}} = Activity.get_by_id(id)
Repo.insert(%Pleroma.Web.ThreadMute{}, %{user_id: user.id, context: context})
mute = %Pleroma.Web.ThreadMute{user_id: user.id, context: context}
Repo.insert(mute)
end
def remove_mute(user, id) do
......
......@@ -3,10 +3,10 @@ defmodule Pleroma.Repo.Migrations.CreateThreadMutes do
def change do
create table(:thread_mutes) do
add :user, references(:users, type: :uuid, on_delete: :delete_all)
add :user_id, references(:users, type: :uuid, on_delete: :delete_all)
add :context, :string
end
create index(:thread_mutes, [:user])
create index(:thread_mutes, [:user_id])
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment