Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico-Sanchez committed Dec 24, 2024
1 parent 28663fc commit cadcc19
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 1 addition & 2 deletions apps/arena/lib/arena/configuration.ex
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ defmodule Arena.Configuration do
|> Finch.request(Arena.Finch)

Jason.decode!(payload.body, [{:keys, :atoms}])
|> Map.update!(:map, fn maps -> Enum.map(maps, fn map -> parse_map_config(map) end)
end)
|> Map.update!(:map, fn maps -> Enum.map(maps, fn map -> parse_map_config(map) end) end)
|> Map.get(:map)
end

Expand Down
10 changes: 9 additions & 1 deletion apps/game_backend/lib/game_backend/configuration/version.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ defmodule GameBackend.Configuration.Version do
|> cast_assoc(:skills, with: &Skill.assoc_changeset/2)
|> cast_assoc(:map_configurations, with: &MapConfiguration.assoc_changeset/2)
|> cast_assoc(:game_configuration, with: &GameConfiguration.assoc_changeset/2)
|> validate_required([:name, :current, :characters, :consumable_items, :skills, :map_configurations, :game_configuration])
|> validate_required([
:name,
:current,
:characters,
:consumable_items,
:skills,
:map_configurations,
:game_configuration
])
end
end

0 comments on commit cadcc19

Please sign in to comment.