hugger-lover / app /actions /check_user.ts
enzostvs's picture
enzostvs HF staff
init
7f5876d
raw
history blame contribute delete
282 Bytes
"use server";
export const check_user = async (username: string) => {
const userResponse = await fetch(
`https://huggingface.co/api/users/${username}/overview`
);
const user = await userResponse.json();
if (!user || user.error) {
return false;
}
return true;
}