import axios from 'axios'
// Config
import { baseURL } from '../../../Config'

interface LoginData {
  email: string
  password: string
}

export const loginUsers = async (user: LoginData) => {
  try {
    const { data } = await axios.post(baseURL + '/users/login', user)
    return data
  } catch (error) {
    console.error(error)
  }
}
