anchor.diff:  -spec(create(Device :: #device{}) -> {ok, #device{}} | {error, string()}).
   create(Device) ->
     gen_server:call(?SERVER, {create, Device}).
  +
  +-spec(update(Device :: #device{}) -> {ok, #device{}} | {error, string()}).
  +update(Device) ->
  +  gen_server:call(?SERVER, {update, Device}).
   
   %%--------------------------------------------------------------------
   %% @doc
  
positive.code:   {stop, Reason :: term(), NewState :: #state{}}).
  handle_call({get}, _From, State) ->
    do_get_devices(State);
  handle_call({create, User}, _From, State) ->
    do_create_device(State, User);
  handle_call(_Request, _From, State) ->
    {reply, ok, State}.
  
  
negative.code:       end;
      Reason ->
        {reply, Reason, State}
    end.
  
  do_update_device(State = #state{cache = Cache}, DeviceModel) ->
    case em_storage:update_device(DeviceModel) of
      {ok, Device} ->
        case ets:insert(Cache, Device) of
          true ->
            {reply, {ok, Device}, State};
          false -> {reply, {error, <<"Error sync in devices cache">>}, State}
        end;
      Reason ->
        {reply, Reason, State}
    end.
  