import { useHttp } from "@/modules/http"; import axios from "axios"; const { post } = useHttp(); export const submit = async (email: string, password: string) => ( await post('/account/login', { email, password }) ) export const logout = async (): Promise => (await post('/account/logout')); export const fetchProfile = async(email: string, token: string) => ( await axios({ url: "http://127.0.0.1:3000/api/account/profile", headers: { Cookie: `jwt=${token}` }, method: 'GET', data: { email, } }) )