const authenticate = async ({ username, password, }: { username: string; password: string; }) => { const res = await fetch("/api/authenticate", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ username, password, }), }); return res; }; export default authenticate;