parent
b45e020080
commit
04fdb4b0e1
1 changed files with 9 additions and 0 deletions
@ -0,0 +1,9 @@ |
|||||||
|
import { useAppContext } from '../../contexts/AppContext' |
||||||
|
import { Account } from '../../types' |
||||||
|
|
||||||
|
export const useCreateAccount = () => { |
||||||
|
const api = useAppContext() |
||||||
|
|
||||||
|
return (body: Omit<Account, 'id'>): Promise<Account> => |
||||||
|
api.post<Account>('/accounts', body) |
||||||
|
} |
Loading…
Reference in new issue