mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 08:32:14 +00:00
fix function shared_send_via_email in ShareController
This commit is contained in:
@@ -147,18 +147,15 @@ class ShareController extends Controller
|
||||
// Return error
|
||||
if ($validator->fails()) abort(400, 'Bad emails input');
|
||||
|
||||
// Get shared by token
|
||||
$share = Share::where('token', $token)
|
||||
->where('user_id', Auth::id())
|
||||
->first();
|
||||
|
||||
// Demo preview
|
||||
if (env('APP_DEMO')) {
|
||||
return response('Done!', 204);
|
||||
}
|
||||
|
||||
// Send share link via email
|
||||
$share->sendSharedLinkViaEmail($request->emails, $token);
|
||||
foreach ($request->emails as $email) {
|
||||
Notification::route('mail', $email)->notify(new SharedSendViaEmail($token));
|
||||
}
|
||||
|
||||
return response('Done!', 204);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user