Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fermion committed Jan 10, 2024
1 parent c8672a3 commit fe988ea
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
get 'current_user/create'
end

# if Rails.env.development?
mount GraphiQL::Rails::Engine, at: "/graphiql", graphql_path: "/graphql", constraints: lambda { |request|
# only allow authenticated users
Passwordless::Session.exists?(id: request.session[:"passwordless_session_id--user"])
}
# end
mount GraphiQL::Rails::Engine, at: "/graphiql", graphql_path: "/graphql", constraints: lambda { |request|
# only allow authenticated users, otherwise 404
Passwordless::Session.exists?(id: request.session[:"passwordless_session_id--user"])
}

post "/graphql", to: "graphql#execute"

Expand Down

0 comments on commit fe988ea

Please sign in to comment.