Introduce registerPerson mutation

To register a profile from an unactivated user

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

👤 Fix Person interface use

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Change host function for data property

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-01-29 11:02:32 +01:00
parent c55ae19f84
commit 681653e035
13 changed files with 519 additions and 172 deletions

View File

@@ -12,8 +12,8 @@ defmodule MobilizonWeb.Schema.Utils do
# {:error, [email: {"has already been taken", []}]}
errors =
changeset.errors
|> Enum.map(fn {_key, {value, context}} ->
[message: "#{value}", details: context]
|> Enum.map(fn {key, {value, _context}} ->
[message: "#{value}", details: key]
end)
{:error, errors}