mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Fix update user.
This commit is contained in:
parent
5fc96cf5e1
commit
ef324fdf73
5 changed files with 17 additions and 6 deletions
|
|
@ -16,7 +16,9 @@ import useMessages from 'hooks/useMessages';
|
|||
export default function UserEditForm({ userId, data, onSave }) {
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
const { post, useMutation } = useApi();
|
||||
const { mutate, error } = useMutation(({ username }) => post(`/users/${userId}`, { username }));
|
||||
const { mutate, error } = useMutation(({ username, password, role }) =>
|
||||
post(`/users/${userId}`, { username, password, role }),
|
||||
);
|
||||
|
||||
const handleSubmit = async data => {
|
||||
mutate(data, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue