replaced email with username
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user