Skip to content

Commit

Permalink
fix: resource comes from the route on domains
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Jun 18, 2024
1 parent d5dd38c commit acc0750
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ash_json_api/domain/verifiers/verify_relationships.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ defmodule AshJsonApi.Domain.Verifiers.VerifyRelationships do
use Spark.Dsl.Verifier

def verify(dsl) do
resource = Spark.Dsl.Verifier.get_persisted(dsl, :module)

dsl
|> AshJsonApi.Resource.Info.routes()
|> Enum.each(fn route ->
resource = route.resource

if route.relationship do
relationship = Ash.Resource.Info.relationship(resource, route.relationship)

Expand Down

0 comments on commit acc0750

Please sign in to comment.