File size: 410 Bytes
c3bf538
 
24f4709
 
c3bf538
24f4709
e85ed70
c3bf538
 
e85ed70
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import axios from 'axios';

const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:8000';

const apiClient = axios.create({
  baseURL: API_URL,
  headers: { 'Content-Type': 'application/json' },
});

export const createJob = (ticker) => apiClient.post('/jobs', { ticker });
export const getJob = (jobId) => apiClient.get(`/jobs/${jobId}`);
export const getJobsHistory = () => apiClient.get('/jobs');