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 committed 2025-07-13 21:19:33 +08:00
1 parent c95448b4b0
commit 939d1c2b65
2 files changed
+11 -12

No files matched your search

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