13 lines
441 B
TypeScript
13 lines
441 B
TypeScript
import type { paths } from '@/shared/api/schema';
|
|
|
|
import { api } from '@/shared/api/client';
|
|
|
|
export type AdCashResponse = paths['/cash']['post']['responses']['200']['content']['application/json'];
|
|
export type AddCashBody = paths['/cash']['post']['requestBody']['content']['application/json'];
|
|
|
|
export async function addCash(data: AddCashBody) {
|
|
const { data: result } = await api.post<AdCashResponse>('/cash', data);
|
|
|
|
return result;
|
|
}
|