update new api reques and response

This commit is contained in:
Samandar Turgunboyev
2025-12-05 17:47:11 +05:00
parent 21725762c6
commit db6bfa7e40
30 changed files with 1755 additions and 262 deletions

View File

@@ -0,0 +1,21 @@
import type { DistributedList } from "@/features/distributed/lib/data";
import httpClient from "@/shared/config/api/httpClient";
import { DISTRIBUTED_CREATE, DISTRIBUTED_LIST } from "@/shared/config/api/URLs";
import type { AxiosResponse } from "axios";
export const distributed_api = {
async list(): Promise<AxiosResponse<DistributedList>> {
const res = await httpClient.get(DISTRIBUTED_LIST);
return res;
},
async create(body: {
product_id: number;
date: string;
employee_name: string;
quantity: number;
}) {
const res = await httpClient.post(DISTRIBUTED_CREATE, body);
return res;
},
};