1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-09-20 09:41:35 +02:00

🐛 fix register date of birth

This commit is contained in:
Flam3rboy 2021-02-02 00:58:32 +01:00
parent 8505d9279b
commit 18d4aa0c67
2 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@
"INVITE_ONLY": "You must be invited to register",
"EMAIL_INVALID": "Invalid Email",
"EMAIL_ALREADY_REGISTERED": "Email is already registered",
"DATE_OF_BIRTH_UNDERAGE": "You need to be {{years}} or older",
"DATE_OF_BIRTH_UNDERAGE": "You need to be {{years}} years or older",
"CONSENT_REQUIRED": "You must agree to Terms of Service and Privacy Policy.",
"USERNAME_TOO_MANY_USERS": "Too many users have this username, please try another"
}

View File

@ -20,7 +20,7 @@ router.post(
$email: Email,
$fingerprint: String,
$invite: String,
$date_of_birth: String, // "2000-04-03"
$date_of_birth: Date, // "2000-04-03"
$gift_code_sku_id: String,
$captcha_key: String,
}),
@ -110,7 +110,7 @@ router.post(
throw FieldErrors({
date_of_birth: {
code: "DATE_OF_BIRTH_UNDERAGE",
message: req.t("auth:register.DATE_OF_BIRTH_UNDERAGE"),
message: req.t("auth:register.DATE_OF_BIRTH_UNDERAGE", { years: register.dateOfBirth.minimum }),
},
});
}