File "getOrganizations.ts"
Full Path: /var/www/html/gitep_front/src/entities/organization/api/getOrganizations.ts
File size: 487 bytes
MIME-type: text/x-java
Charset: utf-8
import { $modelStore } from '@shared/index';
import { axiosInstance } from "@shared/api";
export const getOrganizations = async () => {
try {
const modelId = $modelStore.getState().model;
if (!modelId) {
throw new Error("modelId не задана");
}
const result = await axiosInstance.get(`dict/${modelId}/organization/list`);
return result
} catch (error) {
console.error('getOrganizations error', error)
}
}