Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Login.ts 393 B
import { AxiosResponse } from 'axios';
import Api from '../../helpers/Api';
import { ILoginForm } from '../../components/Login/Login';
import { IUser } from '../../providers/AuthProvider';

export async function loginUser(form: ILoginForm): Promise<AxiosResponse<IUser>> {
  return Api.post('User/login', {
    Email: form.email,
    Password: form.password
  }, { withCredentials: true });
}