import {PostLogin, PostData} from '../helpers';

import url from '../url';

export const loginApi = async (body) =>
  PostLogin(url.urllogin, body)
    .then((res) => res)
    .catch((err) => err);

export const registorApi = async (body) =>
  PostLogin(url.urlRegistor, body)
    .then((res) => res)
    .catch((err) => err);

export const logoutApi = async (body) =>
  PostData('http://api.dcvinvest.com/api/auth/logout', body)
    .then((res) => res)
    .catch((err) => err);

export const getOTPApi = async (body) =>
  PostLogin(url.urlGetOTP, body)
    .then((res) => res)
    .catch((err) => err);

export const verifyOTPApi = async (body) =>
  PostLogin(url.urlVerifyOTP, body)
    .then((res) => res)
    .catch((err) => err);

export const forgotPasswordApi = async (body) =>
  PostLogin(url.urlForgotPassword, body)
    .then((res) => res)
    .catch((err) => err);
