fix(register): handle invalid invite code gracefully

Fix an issue where entering a non-existent invite code during registration would result in an unclear HTTP code 0 error. Now, the system properly validates the invite code and returns a clear error response if the code does not exist.
This commit is contained in:
xboard
2025-07-13 21:19:33 +08:00
parent 18de0e8a43
commit a01b94f131
2 changed files with 11 additions and 12 deletions

View File

@@ -13,4 +13,7 @@ class InviteCode extends Model
'updated_at' => 'timestamp',
'status' => 'boolean',
];
const STATUS_UNUSED = 0;
const STATUS_USED = 1;
}