Fixed broken Laravel Mix

Also disabled IP history logger for demo mode
This commit is contained in:
Miguel Nogueira 2021-09-04 02:56:18 +01:00
parent 3f4bc28fd4
commit e6f84cd09a
Signed by: miguel456
GPG Key ID: 2CF61B825316C6A0
2 changed files with 12 additions and 8 deletions

View File

@ -81,14 +81,16 @@ class LoginController extends Controller
public function authenticated(Request $request, User $user)
{
if ($user->originalIP !== $request->ip())
{
Log::alert('User IP address changed from last login. Updating.', [
'prev' => $user->originalIP,
'new' => $request->ip()
]);
$user->originalIP = $request->ip();
$user->save();
if (!config('demo.is_enabled')) {
if ($user->originalIP !== $request->ip())
{
Log::alert('User IP address changed from last login. Updating.', [
'prev' => $user->originalIP,
'new' => $request->ip()
]);
$user->originalIP = $request->ip();
$user->save();
}
}
}
}

2
webpack.mix.js vendored
View File

@ -1,3 +1,5 @@
let mix = require('laravel-mix');
mix.js(['resources/js/app.js', 'resources/js/application_charts.js', 'resources/js/calendar.js'], 'public/js')
.sass('resources/sass/app.scss', 'public/css');