Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Feb 4, 2024
1 parent 6185eb8 commit ce0e2ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/campfire/context/team_context.ex
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ defmodule Campfire.Context.TeamContext do
Update a team meta
"""
def update_team_meta(team_meta, attrs) do
TeamMeta.changeset(team_meta, attrs)
team_meta
|> TeamMeta.changeset(attrs)
|> Repo.update()
end

Expand Down
6 changes: 4 additions & 2 deletions lib/campfire/context/user_context.ex
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,17 @@ defmodule Campfire.Context.UserContext do
Update a user meta
"""
def update_user_meta(user_meta, attrs) do
UserMeta.changeset(user_meta, attrs)
user_meta
|> UserMeta.changeset(attrs)
|> Repo.update()
end

@doc """
Update a user session
"""
def update_user_session(user_session, attrs) do
UserSession.changeset(user_session, attrs)
user_session
|> UserSession.changeset(attrs)
|> Repo.update()
end

Expand Down

0 comments on commit ce0e2ca

Please sign in to comment.