import { AxiosResponse } from 'axios';
import { apiClient } from '../lib/apiClient';

export const getAuth = (locale: string, data: { login: string, password: string }): Promise<AxiosResponse<{ jwtToken: string }>> => (
    apiClient.post(
        '/auth/login',
        data,
        {
            headers: {
                'X-User-Language': locale
            }
        }
    )
);

export const getRegister = (locale: string): Promise<AxiosResponse<{ jwtToken: string }>> => (
    apiClient.post(
        '/auth/register',
        {},
        {
            headers: {
                'X-User-Language': locale
            }
        }
    )
);
