import { environment } from '../../enviroments/enviroments';
import axios from 'axios';

export function login({
  username,
  password,
}: {
  username: string;
  password: string;
}): any {
  return axios({
    method: 'post',
    baseURL: `${
      environment.localhost + environment.localeRu + environment.apiPrefix
    }`,
    url: `${environment.endPoints.login}`,
    data: { username, password },
    headers: {
      'Content-Type': 'application/json',
    },
  });
}
