From 7184f076617493b29ddaf4413ab58d14bba4b9d4 Mon Sep 17 00:00:00 2001 From: nsensfel Date: Fri, 14 Dec 2018 15:18:09 +0100 Subject: ... --- src/roster/query/rst_update.erl | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/roster/query') diff --git a/src/roster/query/rst_update.erl b/src/roster/query/rst_update.erl index af421ea..8afa249 100644 --- a/src/roster/query/rst_update.erl +++ b/src/roster/query/rst_update.erl @@ -124,11 +124,10 @@ commit_update (QueryState, Input) -> { rst_roster:set_character(IX, Character, CurrentRoster), [ - shr_db_query:update_indexed + ataxic_sugar:update_array_cell ( - rst_roster:get_characters_field(), IX, - [shr_db_query:set_value(Character)] + ataxic:constant(Character) ) | UpdateList ] @@ -138,16 +137,21 @@ commit_update (QueryState, Input) -> Characters ), - Query = - shr_db_query:new + ok = + ataxia_client:update ( roster_db, - RosterID, - {user, PlayerID}, - QueryList + ataxia_security:user_from_id(PlayerID), + ataxic:value + ( + ataxic:update_field + ( + rst_roster:get_characters_field(), + ataxic:sequence(QueryList) + ) + ) ), - shr_database:commit(Query), shr_timed_cache:update(roster_db, PlayerID, RosterID, UpdatedRoster), 'ok'. -- cgit v1.2.3-70-g09d2