Commits

Anonymous committed f46a1d9

update stickynotes for binary-bucket-name change

Comments (0)

Files changed (2)

demo/stickynotes/src/notes.erl

 %%      opportunity to act on that information.
 after_write(_Key, JiakObject, ReqData, Context) ->
     spawn(fun() ->
-                  [[_, GroupKey, _]] = jiak_object:links(JiakObject, groups),
+                  [[_, GroupKey, _]] = jiak_object:links(JiakObject, <<"groups">>),
                   {ok, C} = jiak:local_client(),
-                  {ok, G} = C:get(groups, GroupKey, 2),
+                  {ok, G} = C:get(<<"groups">>, GroupKey, 2),
                   Key = Context:get_prop(key),
-                  C:put(jiak_object:add_link(G, notes, Key, <<"note">>), 2)
+                  C:put(jiak_object:add_link(G, <<"notes">>, Key, <<"note">>), 2)
           end),
     {ok, ReqData, Context}.
 

demo/stickynotes/src/stickynotes_sup.erl

            proplists:get_value(doorbell_port, RiakConfig),
            proplists:get_value(riak_cookie, RiakConfig)) of
         {ok, C} ->
-            C:set_bucket(notes, [{allow_mult, true}]),
-            C:set_bucket(groups, [{allow_mult, true}]);
+            C:set_bucket(<<"notes">>, [{bucket_mod, notes},{allow_mult, true}]),
+            C:set_bucket(<<"groups">>, [{bucket_mod, groups},{allow_mult, true}]);
         Error ->
             error_logger:error_msg(
               "Unable to connect to riak cluster at ~p:~p"