/
afanasevn
/
MaxSystems
Обзор
Документация
Войти
/
afanasevn
/
MaxSystems
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
client/src/api/import.ts
20 строк
501 B
IBS\NAfanasev
Add project files.
18 июн 2026, 01:12
18 июн 2026, 01:12
b06aa39
Код
Авторство
О чём код?
import { apiUploadForm } from './http' export type ImportDataType = 'equipment' | 'warehouse' export type ImportError = { row: number message: string } export type ImportResult = { success: number errors: ImportError[] } export async function uploadImport(file: File, dataType: ImportDataType): Promise<ImportResult> { const formData = new FormData() formData.append('file', file) formData.append('dataType', dataType) return apiUploadForm<ImportResult>('/api/import', formData) }