import { $axios } from '@/plugins/axios';
import { AxiosResponse } from 'axios';

export default {
  getAll: async (): Promise<[AxiosResponse?, string?]> => {
    try {
      const data = await $axios.get('v1/permissions');
      return [data, undefined];
    } catch (e: any) {
      return [undefined, e?.response?.data?.error ?? e.message];
    }
  },
};
