mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-24 12:09:02 -05:00
refactor: use laravel notifications for system user private messages
This commit is contained in:
@@ -18,6 +18,7 @@ namespace App\Http\Controllers\User;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\User;
|
||||
use App\Notifications\ApikeyReset;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Str;
|
||||
@@ -45,10 +46,7 @@ class ApikeyController extends Controller
|
||||
$user->apikeys()->create(['content' => $user->api_token]);
|
||||
|
||||
if ($changedByStaff) {
|
||||
$user->sendSystemNotification(
|
||||
subject: 'ATTENTION - Your API key has been reset',
|
||||
message: "Your API key has been reset by staff. You will need to update your API key in all your scripts to continue using the API.\n\nFor more information, please create a helpdesk ticket.",
|
||||
);
|
||||
$user->notify(new ApikeyReset());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user