Consolidate duplicate send-card error translations into messages.error.cannot_send_card

This commit is contained in:
antv
2026-07-15 22:43:16 +07:00
parent b59c71aaef
commit 041ea8fe77
2 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -52,11 +52,11 @@ class UserService implements UserServiceInterface
$lockedSender = User::where('id', $sender->id)->lockForUpdate()->first();
if ($lockedSender->flag_send == config('constants.FLAG_SEND_DISABLED')) {
throw new \App\Exceptions\ThankCardException(__('messages.error.no_send_permission'));
throw new \App\Exceptions\ThankCardException(__('messages.error.cannot_send_card'));
}
if ($lockedSender->card < $amount) {
throw new \App\Exceptions\ThankCardException(__('messages.error.not_enough_cards'));
throw new \App\Exceptions\ThankCardException(__('messages.error.cannot_send_card'));
}
// Lock & check total sent cards to the receiver this month