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