const service = require('../services/auth.service')
const servicegoogle = require('../services/authGoogle.service')

exports.signIn = async (req, res) => {
    const response = await service.signIn(req,res)
    return response 
}

exports.sendOtp = async (req, res) => {
    const response = await service.sendOtp(req, res)
    return response
}

 exports.checkOtp = async (req, res) => {
    const response = await service.checkOtp(req, res)
    return response
}

 exports.signUp = async (req, res) => {
    const response = await service.signUp(req, res)
    return response
}

exports.getUserlogin = async (req, res) => {
    const token = req.headers.authorization?.split(" ")[1]
    const response = await service.getUserLogin(token, res)
    return response
}

exports.forgotPassword = async(req, res) => {
    var body = req.body
    const response = await service.forgotPassword(body, res)
    return response
  }
  
  exports.resetPassword = async(req, res, token) => {
    var body = req.body
    var token = token
    const response = await service.resetPassword(body, token, res)
    return response
  }
exports.loginWithGoogle = async (req, res) => {
    const response = await servicegoogle.loginWithGoogle(req, res)
    return response
}




