'use server'

import React from 'react'
import http from '../app/components/http';

export default async function register({formData}) {
 const { email, password, username} = formData
 console.log(formData)
    try{
        const response = await http.post("auth/register", formData);
        console.log(response)
      return response}
      catch(error){
        console.log(error)
        return (error)
      }

}
