diff --git a/components/forms/AccountEditForm.js b/components/forms/AccountEditForm.js index 3f54b2f5..70125656 100644 --- a/components/forms/AccountEditForm.js +++ b/components/forms/AccountEditForm.js @@ -15,13 +15,13 @@ const initialValues = { password: '', }; -const validate = ({ userId, username, password }) => { +const validate = ({ id, username, password }) => { const errors = {}; if (!username) { errors.username = ; } - if (!userId && !password) { + if (!id && !password) { errors.password = ; } @@ -33,8 +33,8 @@ export default function AccountEditForm({ values, onSave, onClose }) { const [message, setMessage] = useState(); const handleSubmit = async values => { - const { userId } = values; - const { ok, data } = await post(userId ? `/accounts/${userId}` : '/accounts', values); + const { id } = values; + const { ok, data } = await post(id ? `/accounts/${id}` : '/accounts', values); if (ok) { onSave(); diff --git a/components/forms/WebsiteEditForm.js b/components/forms/WebsiteEditForm.js index 00cba540..b56e21c1 100644 --- a/components/forms/WebsiteEditForm.js +++ b/components/forms/WebsiteEditForm.js @@ -94,7 +94,7 @@ export default function WebsiteEditForm({ values, onSave, onClose }) { return ( @@ -128,7 +128,7 @@ export default function WebsiteEditForm({ values, onSave, onClose }) {