Skip to content

Commit

Permalink
https://github.com/bonfire-networks/bonfire-app/issues/1088
Browse files Browse the repository at this point in the history
  • Loading branch information
mayel committed Jan 18, 2025
1 parent ed29ea9 commit 2403ea5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/contexts/circles.ex
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,19 @@ defmodule Bonfire.Boundaries.Circles do
get_for_caretaker(id, Bonfire.Boundaries.Scaffold.Instance.admin_circle(), opts)
end

@doc "Gets a circle by ID, after checking boundaries to see if this is a list shared with me"
def get(id, opts \\ []) do
opts = opts ++ @default_q_opts

with {:ok, circle} <-
query(opts)
|> query_by_id(id, opts)
|> boundarise(circle.id, opts)
|> repo().single() do
{:ok, circle}
end
end

@doc """
Retrieves a circle by name for a caretaker.
Expand Down

0 comments on commit 2403ea5

Please sign in to comment.