import { api } from '@/lib/axios'

export type AccountsProps = {
  id: string
  name: string
  email: string
}

export async function getAccounts() {
  const accounts = await api.get<AccountsProps[]>('/accounts')
  return accounts
}

export async function getAccountsId(id: string) {
  const account = await api.get<AccountsProps>(`/accounts/${id}`)
  return account
}
