Upload source code
This commit is contained in:
9
src/client/services/yieldStudyService.ts
Normal file
9
src/client/services/yieldStudyService.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import api from './api';
|
||||
import type { YieldStudy } from '../types';
|
||||
|
||||
const BASE_URL = '/yield-studies';
|
||||
|
||||
export const getStudies = () => api.get<YieldStudy[]>(BASE_URL);
|
||||
export const createStudy = (data: Partial<YieldStudy>) => api.post<YieldStudy>(BASE_URL, data);
|
||||
export const updateStudy = (id: string, data: Partial<YieldStudy>) => api.put<YieldStudy>(`${BASE_URL}/${id}`, data);
|
||||
export const deleteStudy = (id: string) => api.delete(`${BASE_URL}/${id}`);
|
||||
Reference in New Issue
Block a user