Update the AuthorTransformer to sync all attributes and relationships.

This commit is contained in:
2025-05-06 15:15:40 +03:00
parent 3b761f9c66
commit d57fa73825
2 changed files with 33 additions and 11 deletions
@@ -13,7 +13,11 @@ defmodule DecentralisedBookIndex.Sync.DataTransformers.AuthorTransformer do
name: get_in(json_body, ["attributes", "name"]),
description: get_in(json_body, ["attributes", "description"]),
avatar_url: get_in(json_body, ["attributes", "avatar_url"]),
author_alias_registry_id: get_in(json_body, ["attributes", "author_alias_registry_id"])
inserted_at: get_in(json_body, ["attributes", "inserted_at"]),
updated_at: get_in(json_body, ["attributes", "updated_at"]),
# relationship
author_alias_registry_id: get_in(json_body, ["attributes", "author_alias_registry_id"]),
dbi_server_id: get_in(json_body, ["attributes", "dbi_server_id"])
}
{:ok, attrs}