Fixed #8597 - Added leading slash to notifications console commands

This commit is contained in:
snipe 2020-10-23 04:46:26 -07:00
parent 2263dae8f4
commit f5a0726f98
3 changed files with 4 additions and 4 deletions

View file

@ -58,7 +58,7 @@ class SendExpectedCheckinAlerts extends Command
$recipients = collect(explode(',', $settings->alert_email))->map(function ($item, $key) { $recipients = collect(explode(',', $settings->alert_email))->map(function ($item, $key) {
return new AlertRecipient($item); return new AlertRecipient($item);
}); });
Notification::send($recipients, new ExpectedCheckinAdminNotification($assets)); \Notification::send($recipients, new ExpectedCheckinAdminNotification($assets));
} }
} }
} }

View file

@ -55,14 +55,14 @@ class SendExpirationAlerts extends Command
$assets = Asset::getExpiringWarrantee($threshold); $assets = Asset::getExpiringWarrantee($threshold);
if ($assets->count() > 0) { if ($assets->count() > 0) {
$this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $threshold])); $this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $threshold]));
Notification::send($recipients, new ExpiringAssetsNotification($assets, $threshold)); \Notification::send($recipients, new ExpiringAssetsNotification($assets, $threshold));
} }
// Expiring licenses // Expiring licenses
$licenses = License::getExpiringLicenses($threshold); $licenses = License::getExpiringLicenses($threshold);
if ($licenses->count() > 0) { if ($licenses->count() > 0) {
$this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $threshold])); $this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $threshold]));
Notification::send($recipients, new ExpiringLicenseNotification($licenses, $threshold)); \Notification::send($recipients, new ExpiringLicenseNotification($licenses, $threshold));
} }
} else { } else {
if ($settings->alert_email == '') { if ($settings->alert_email == '') {

View file

@ -52,7 +52,7 @@ class SendInventoryAlerts extends Command
return new AlertRecipient($item); return new AlertRecipient($item);
}); });
Notification::send($recipients, new InventoryAlert($items, $settings->alert_threshold)); \Notification::send($recipients, new InventoryAlert($items, $settings->alert_threshold));
} }
} else { } else {
if ($settings->alert_email == '') { if ($settings->alert_email == '') {