Comparison

util/pubsub.lua @ 9236:83375ec33619

util.pubsub: Expand comment on return type from get_items
author Kim Alvefur <zash@zash.se>
date Sat, 01 Sep 2018 00:45:51 +0200
parent 9233:885dd6845e62
child 9516:038446c50630
comparison
equal deleted inserted replaced
9235:7fbcabee6df1 9236:83375ec33619
581 self.config.broadcaster("purge", node, node_obj.subscribers, nil, actor, node_obj, self); 581 self.config.broadcaster("purge", node, node_obj.subscribers, nil, actor, node_obj, self);
582 end 582 end
583 return true 583 return true
584 end 584 end
585 585
586 function service:get_items(node, actor, id) --> ok, err 586 function service:get_items(node, actor, id) --> (true, { id, [id] = node }) or (false, err)
587 -- Access checking 587 -- Access checking
588 if not self:may(node, actor, "get_items") then 588 if not self:may(node, actor, "get_items") then
589 return false, "forbidden"; 589 return false, "forbidden";
590 end 590 end
591 -- 591 --