fix: harden editorial registration flow
This commit is contained in:
1 parent
9b22752ef2
commit
a8d4e54ffb
8 files changed
+445
-109
No files matched your search
@@ -3,7 +3,10 @@ import { redirect } from "next/navigation";
|
||||
|
||||
import { env } from "@/config/env";
|
||||
import { registerEditorial } from "@/modules/auth/auth";
|
||||
import { RegistrationValidationError } from "@/modules/auth/registration";
|
||||
import {
|
||||
CURRENT_TERMS_VERSION,
|
||||
RegistrationValidationError,
|
||||
} from "@/modules/auth/registration";
|
||||
import {
|
||||
RegistrationForm,
|
||||
type RegistrationFormState,
|
||||
@@ -57,7 +60,7 @@ async function registerAction(
|
||||
countryCode: text(formData, "countryCode"),
|
||||
},
|
||||
actsForBusiness: formData.has("actsForBusiness"),
|
||||
termsVersion: formData.has("termsAccepted") ? text(formData, "termsVersion") : "",
|
||||
termsVersion: formData.has("termsAccepted") ? CURRENT_TERMS_VERSION : "",
|
||||
privacyAcknowledged: formData.has("privacyAcknowledged"),
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user