2022-12-25 15:30:47 +00:00
|
|
|
import { getFamily, put } from './lib';
|
|
|
|
import getUri from '../lib/ids';
|
|
|
|
|
2022-12-25 20:37:59 +00:00
|
|
|
export const initialAccount = {
|
|
|
|
id: 'initial',
|
|
|
|
name: '???',
|
|
|
|
localDb: 'dyomedea',
|
|
|
|
};
|
|
|
|
|
2022-12-25 15:30:47 +00:00
|
|
|
export const getAccounts = async () => {
|
|
|
|
return await getFamily('account', {}, true);
|
|
|
|
};
|
|
|
|
|
2022-12-25 20:37:59 +00:00
|
|
|
export const putAccount = async (id: string, account: any) => {
|
|
|
|
const uri = getUri('account', { account: id });
|
2022-12-25 15:30:47 +00:00
|
|
|
return await put(uri, 'account', (_: any) => account, {}, true);
|
|
|
|
};
|