Add the JSON API exntension for BookId and AuthorRoles.
This commit is contained in:
@@ -2,10 +2,15 @@ defmodule DecentralisedBookIndex.Metadata.AuthorRole do
|
||||
use Ash.Resource,
|
||||
otp_app: :decentralised_book_index,
|
||||
domain: DecentralisedBookIndex.Metadata,
|
||||
data_layer: AshPostgres.DataLayer
|
||||
data_layer: AshPostgres.DataLayer,
|
||||
extensions: [AshJsonApi.Resource]
|
||||
|
||||
alias DecentralisedBookIndex.Metadata
|
||||
|
||||
json_api do
|
||||
type "author_role"
|
||||
end
|
||||
|
||||
postgres do
|
||||
table "author_role"
|
||||
repo DecentralisedBookIndex.Repo
|
||||
|
||||
@@ -2,10 +2,15 @@ defmodule DecentralisedBookIndex.Metadata.BookId do
|
||||
use Ash.Resource,
|
||||
otp_app: :decentralised_book_index,
|
||||
domain: DecentralisedBookIndex.Metadata,
|
||||
data_layer: AshPostgres.DataLayer
|
||||
data_layer: AshPostgres.DataLayer,
|
||||
extensions: [AshJsonApi.Resource]
|
||||
|
||||
alias DecentralisedBookIndex.Metadata
|
||||
|
||||
json_api do
|
||||
type "book_id"
|
||||
end
|
||||
|
||||
postgres do
|
||||
table "book_ids"
|
||||
repo DecentralisedBookIndex.Repo
|
||||
|
||||
Reference in New Issue
Block a user