Skip to content

Commit

Permalink
Merge pull request #482 from plastic-forks/zd/improve-doc
Browse files Browse the repository at this point in the history
fix typo in docs
  • Loading branch information
woylie authored Jul 30, 2024
2 parents e628334 + 1fbfab0 commit a60e4ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ argument can be used to override certain options depending on the context in
which the function is called.

```elixir
def list_pets(%{} = args, opts \\ [], %User{} = current_user) do
def list_pets(%{} = params, opts \\ [], %User{} = current_user) do
flop_opts =
opts
|> Keyword.take([
Expand All @@ -285,7 +285,7 @@ def list_pets(%{} = args, opts \\ [], %User{} = current_user) do
Pet
|> scope(current_user)
|> apply_filters(opts)
|> Flop.validate_and_run(flop, flop_opts)
|> Flop.validate_and_run(params, flop_opts)
end

defp scope(q, %User{role: :admin}), do: q
Expand Down

0 comments on commit a60e4ea

Please sign in to comment.