anchor.diff:  	Json2 = maybe_add_id(Id, Json1),
   	Json3 = maybe_add_accepted(Accepted, Json2),
   	Json4 = maybe_add_data(Data, Json3),
  +	lager:info("Json before adding action ~p: ~p", [Action, Json4]),
   	[{<<"action">>, Action} | Json4].
   
   maybe_add_type(rpgb_rec_battlemap, Json) ->
  
positive.code: -module(rpgb_handle_map_websocket).
  -behavior(cowboy_websocket_handler).
  
  -include("rpg_battlemap.hrl").
  
  -ifdef(TEST).
  
negative.code: 				{ok, #rpgb_rec_layer{battlemap_id = MapId} = Layer} ->
  					case rpgb_rec_layer:delete(Layer, State#state.map) of
  						{ok, Map2} ->
  							lager:info("deleted layer ~p", [Id]),
  							make_reply(From, true, undefined);
  						{error, last_layer} ->
  							make_reply(From, false, <<"cannot delete last layer">>);
  						{error, Wut} ->
  							make_reply(From, false, iolist_to_binary(io_lib:format("unknown error: ~p", [Wut])))
  					end;
  				{ok, _Layer} ->
  					make_reply(From, false, <<"layer not part of map">>)
  			end;
  		true ->
  			make_reply(From, false, <<"only owner can delete layers">>)
  	end,
  	{reply, {text, Reply}, Req, State};
  
  dispatch(Req, State, From, <<"get">>, <<"layer">>, undefined, _Json) ->
  	DataReses = lists:map(fun(Id) ->
  