测试: 完成游戏娱乐模块 (Gomoku, HorseRace, Lottery 等) 功能全量联调测试与代码格式化

This commit is contained in:
2026-04-03 13:55:36 +08:00
parent d47f9c5360
commit 659e562208
33 changed files with 3907 additions and 28 deletions
+9 -1
View File
@@ -39,7 +39,15 @@ class AuthController extends Controller
if ($user) {
// 用户存在,验证密码
if (Hash::check($password, $user->password)) {
$passwordMatches = false;
try {
$passwordMatches = Hash::check($password, $user->password);
} catch (\RuntimeException $e) {
// Hash::check() in Laravel 11/12 throws if the hash isn't a valid bcrypt string
$passwordMatches = false;
}
if ($passwordMatches) {
// Bcrypt 验证通过
// 检测是否被封禁 (后台管理员级别获得豁免权,防止误把自己关在门外)
+1 -1
View File
@@ -33,7 +33,7 @@ class StoreRoomRequest extends FormRequest
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:50', 'unique:rooms,name'],
'name' => ['required', 'string', 'max:50', 'unique:rooms,room_name'],
'description' => ['nullable', 'string', 'max:255'],
];
}
+1 -1
View File
@@ -31,7 +31,7 @@ class UpdateRoomRequest extends FormRequest
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:50', 'unique:rooms,name,'.$this->route('id')],
'name' => ['required', 'string', 'max:50', 'unique:rooms,room_name,'.$this->route('id')],
'description' => ['nullable', 'string', 'max:255'],
];
}