useBranchApi.ts 421 B

123456789101112131415161718192021
  1. import { useApi } from './useApi'
  2. export function useBranchApi() {
  3. const { checkModule } = useApi()
  4. const log = useLogger('BranchApi')
  5. try {
  6. const branchModule = checkModule('branch')
  7. return {
  8. branch: branchModule,
  9. }
  10. } catch (e) {
  11. log.error('Ошибка инициализации BranchApi:', e)
  12. reloadNuxtApp({
  13. force: true
  14. })
  15. return {
  16. branch: null,
  17. }
  18. }
  19. }