replaced email with username

This commit is contained in:
Daniel
2023-07-08 14:05:43 +03:30
parent 3993615071
commit 97ca682c0a
32 changed files with 283 additions and 117 deletions
+13
View File
@@ -0,0 +1,13 @@
import { toast } from "react-hot-toast";
export default async function getPublicUserDataByEmail(username: string) {
const response = await fetch(
`/api/routes/users?username=${username.toLowerCase()}`
);
const data = await response.json();
if (!response.ok) toast.error(data.response);
return data.response;
}