user info: allow formdata for notification settings like every other API
This commit is contained in:
parent
59a703fcbe
commit
e7e2e7a1a6
|
@ -75,6 +75,11 @@ def set_activation_status(info, deactivated) do
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_notification_settings(info, settings) do
|
def update_notification_settings(info, settings) do
|
||||||
|
settings =
|
||||||
|
settings
|
||||||
|
|> Enum.map(fn {k, v} -> {k, v in [true, "true", "True", "1"]} end)
|
||||||
|
|> Map.new()
|
||||||
|
|
||||||
notification_settings =
|
notification_settings =
|
||||||
info.notification_settings
|
info.notification_settings
|
||||||
|> Map.merge(settings)
|
|> Map.merge(settings)
|
||||||
|
|
Loading…
Reference in a new issue