From efaf3ee3f4b2478079c7b9dde8f9e879956a460f Mon Sep 17 00:00:00 2001 From: nsensfel Date: Thu, 16 Nov 2017 17:06:17 +0100 Subject: Starting changes in the structure. --- src/battlemap_load_state.erl | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 src/battlemap_load_state.erl (limited to 'src/battlemap_load_state.erl') diff --git a/src/battlemap_load_state.erl b/src/battlemap_load_state.erl deleted file mode 100644 index f311946..0000000 --- a/src/battlemap_load_state.erl +++ /dev/null @@ -1,36 +0,0 @@ --module(battlemap_load_state). - --export( - [ - handle/1 - ] -). - -handle (Req) -> - JSONReqMap = jiffy:decode(Req, [return_maps]), - BattlemapID = maps:get(<<"battlemap_id">>, JSONReqMap), - io:format("~nLoading Battlemap ~p...~n", [BattlemapID]), - {Battlemap, CharList} = - timed_cache_object:fetch( - battlemaps_db, - BattlemapID - ), -%% ok = users_manager:ping(UserToken), - jiffy:encode( - [ - [ - <<"set_map">>, - battlemap_battlemap:encode_in_json(Battlemap) - ] - | - lists:map( - fun (Char) -> - [ - <<"add_char">>, - battlemap_character:encode_in_json(Char) - ] - end, - CharList - ) - ] - ). -- cgit v1.2.3-70-g09d2