Merge pull request #53 from useplunk/dev-driaug-contact-update
Fix: incorrect schema in dashboard
This commit is contained in:
@@ -46,7 +46,7 @@ export default function Index() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const { handleSubmit, watch, setValue, reset } = useForm<ContactValues>({
|
const { handleSubmit, watch, setValue, reset } = useForm<ContactValues>({
|
||||||
resolver: zodResolver(ContactSchemas.update),
|
resolver: zodResolver(ContactSchemas.manage),
|
||||||
});
|
});
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -132,7 +132,7 @@ export default function Index() {
|
|||||||
dataObject = Object.fromEntries(Object.entries(dataObject).filter(([, value]) => value !== ""));
|
dataObject = Object.fromEntries(Object.entries(dataObject).filter(([, value]) => value !== ""));
|
||||||
|
|
||||||
toast.promise(
|
toast.promise(
|
||||||
network.mock<Contact, typeof ContactSchemas.update>(project.secret, "PUT", "/v1/contacts", {
|
network.mock<Contact, typeof ContactSchemas.manage>(project.secret, "PUT", "/v1/contacts", {
|
||||||
id: contact.id,
|
id: contact.id,
|
||||||
...data,
|
...data,
|
||||||
data: dataObject,
|
data: dataObject,
|
||||||
|
|||||||
Reference in New Issue
Block a user