mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-21 00:46:27 +02:00
add stats about credit in use account and update dates for home graph
This commit is contained in:
parent
03ae69b82a
commit
c3637ab3ab
9 changed files with 90 additions and 31 deletions
|
@ -222,7 +222,7 @@ namespace controllers\internals;
|
|||
//If we reached our max quota, do not send the message
|
||||
$internal_quota = new Quota($this->bdd);
|
||||
$nb_credits = $internal_quota::compute_credits_for_message($text); //Calculate how much credit the message require
|
||||
if ($internal_quota->has_enough_credit($id_user, $nb_credits))
|
||||
if (!$internal_quota->has_enough_credit($id_user, $nb_credits))
|
||||
{
|
||||
$return['error'] = false;
|
||||
$return['error_message'] = 'Not enough credit to send message.';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue