mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Split up account update logic.
This commit is contained in:
parent
d4abe51331
commit
5fb1f08df8
3 changed files with 66 additions and 56 deletions
|
|
@ -33,7 +33,8 @@ export default function AccountEditForm({ values, onSave, onClose }) {
|
|||
const [message, setMessage] = useState();
|
||||
|
||||
const handleSubmit = async values => {
|
||||
const { ok, data } = await post('/account', values);
|
||||
const { user_id } = values;
|
||||
const { ok, data } = await post(user_id ? `/account/${user_id}` : '/account', values);
|
||||
|
||||
if (ok) {
|
||||
onSave();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue