Skip to content

Commit

Permalink
Use the middleware for customers
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasbernet committed Aug 18, 2021
1 parent c90d52c commit 585eb61
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/schlusseli_web/schema.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ defmodule SchlusseliWeb.Schema do

@desc "Get all customers"
field :customers, list_of(:customer) do
middleware SchlusseliWeb.Schema.Middleware.Authorize, "view_customers"
resolve &Resolvers.Customer.list_customers/3
end

Expand Down

0 comments on commit 585eb61

Please sign in to comment.