This commit is contained in:
1 parent
e6d7f2280b
commit
8efd032cc6
71 files changed
+6796
-3751
No files matched your search
@@ -31,12 +31,18 @@ const DEFAULT_LOOK = "hr-100-.hd-180-1.ch-255-66.lg-280-110.sh-305-62";
|
||||
|
||||
export async function register(prevState: string | null, formData: FormData): Promise<string | null> {
|
||||
const raw = {
|
||||
username: String(formData.get("username") ?? "").normalize("NFC").trim(),
|
||||
mail: String(formData.get("mail") ?? "").normalize("NFC")
|
||||
username: String(formData.get("username") ?? "")
|
||||
.normalize("NFC")
|
||||
.trim(),
|
||||
mail: String(formData.get("mail") ?? "")
|
||||
.normalize("NFC")
|
||||
.trim()
|
||||
.toLowerCase(),
|
||||
password: String(formData.get("password") ?? "").normalize("NFC"),
|
||||
look: String(formData.get("look") ?? "").normalize("NFC").trim() || DEFAULT_LOOK,
|
||||
look:
|
||||
String(formData.get("look") ?? "")
|
||||
.normalize("NFC")
|
||||
.trim() || DEFAULT_LOOK,
|
||||
};
|
||||
|
||||
const parsed = registerSchema.safeParse(raw);
|
||||
|
||||
Reference in new issue
Block a user