bitlair_mqtt: Add hook to publish the amount of cash
This commit is contained in:
parent
be4abcb9dc
commit
884bb5be2c
1 changed files with 8 additions and 0 deletions
|
@ -17,3 +17,11 @@ sub hook_checkout {
|
|||
for 1..$entry->quantity;
|
||||
}
|
||||
}
|
||||
|
||||
sub hook_user_balance {
|
||||
my ($class, $user, $old, $delta, $new, $transaction_id) = @_;
|
||||
|
||||
return if $user != "-cash";
|
||||
|
||||
publish "bitlair/bank/cash" => "$new";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue