m
This commit is contained in:
@@ -119,6 +119,13 @@ class UserController extends Controller
|
||||
(int) $request->input('amount'),
|
||||
(int) $request->input('template_id', 1)
|
||||
);
|
||||
|
||||
\Illuminate\Support\Facades\Log::info('User sent thank cards', [
|
||||
'sender_id' => Auth::id(),
|
||||
'receiver_msnv' => $request->input('receiver'),
|
||||
'amount' => $request->input('amount'),
|
||||
'template_id' => $request->input('template_id', 1)
|
||||
]);
|
||||
} catch (ThankCardException $e) {
|
||||
return response()->json(['success' => false, 'message' => $e->getMessage()], 422);
|
||||
}
|
||||
@@ -250,6 +257,8 @@ class UserController extends Controller
|
||||
$user = Auth::user();
|
||||
$this->userService->updatePassword($user, $request->input('password'));
|
||||
|
||||
\Illuminate\Support\Facades\Log::info('User updated password', ['user_id' => $user->id]);
|
||||
|
||||
$route = $user->role == config('constants.ROLE_ADMIN') ? 'admin.dashboard' : 'user.dashboard';
|
||||
return redirect()->route($route)->with('success', __('messages.password_change_success'));
|
||||
}
|
||||
@@ -275,6 +284,8 @@ class UserController extends Controller
|
||||
$request->file('avatar')
|
||||
);
|
||||
|
||||
\Illuminate\Support\Facades\Log::info('User updated profile', ['user_id' => $user->id]);
|
||||
|
||||
return redirect()->route('user.edit')->with('success', 'Cập nhật hồ sơ thành công');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user