diff --git a/config/config.exs b/config/config.exs index 837e2c3..3168fb0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -53,7 +53,7 @@ config :spark, config :decentralised_book_index, ecto_repos: [DecentralisedBookIndex.Repo], generators: [timestamp_type: :utc_datetime], - ash_domains: [DecentralisedBookIndex.Books, DecentralisedBookIndex.Accounts] + ash_domains: [DecentralisedBookIndex.Metadata, DecentralisedBookIndex.Accounts] # Configures the endpoint config :decentralised_book_index, DecentralisedBookIndexWeb.Endpoint, diff --git a/lib/decentralised_book_index/books.ex b/lib/decentralised_book_index/books.ex deleted file mode 100644 index ce6f67f..0000000 --- a/lib/decentralised_book_index/books.ex +++ /dev/null @@ -1,8 +0,0 @@ -defmodule DecentralisedBookIndex.Books do - use Ash.Domain, - otp_app: :decentralised_book_index - - resources do - resource DecentralisedBookIndex.Books.Book - end -end diff --git a/lib/decentralised_book_index/metadata.ex b/lib/decentralised_book_index/metadata.ex new file mode 100644 index 0000000..72d66ba --- /dev/null +++ b/lib/decentralised_book_index/metadata.ex @@ -0,0 +1,8 @@ +defmodule DecentralisedBookIndex.Metadata do + use Ash.Domain, + otp_app: :decentralised_book_index + + resources do + resource DecentralisedBookIndex.Metadata.Book + end +end diff --git a/lib/decentralised_book_index/books/book.ex b/lib/decentralised_book_index/metadata/book.ex similarity index 85% rename from lib/decentralised_book_index/books/book.ex rename to lib/decentralised_book_index/metadata/book.ex index 31169a4..57a72ea 100644 --- a/lib/decentralised_book_index/books/book.ex +++ b/lib/decentralised_book_index/metadata/book.ex @@ -1,7 +1,7 @@ -defmodule DecentralisedBookIndex.Books.Book do +defmodule DecentralisedBookIndex.Metadata.Book do use Ash.Resource, otp_app: :decentralised_book_index, - domain: DecentralisedBookIndex.Books, + domain: DecentralisedBookIndex.Metadata, data_layer: AshPostgres.DataLayer postgres do