import { log } from '@deckdeckgo/editor';
import { setData } from '../../utils/data.utils';
export const updateUser = async (user) => {
  log({ msg: '[update][start] user' });
  const t0 = performance.now();
  const { data, id } = user;
  const updatedUser = await setData({ key: `/user`, id, data });
  const t1 = performance.now();
  log({ msg: '[update][done] user', duration: t1 - t0 });
  return updatedUser;
};
