some roblox stuff again

This commit is contained in:
2025-07-24 04:25:18 +03:00
parent e0217cbbcb
commit d1f925f298
35 changed files with 866 additions and 282 deletions

View File

@@ -1,3 +1,5 @@
"use client";
import { proxyFetch } from "./utils";
export type UserProfileDetails = {
@@ -15,7 +17,7 @@ export async function getLoggedInUser(): Promise<{
id: number;
name: string;
displayName: string;
}> {
} | null> {
const data = await proxyFetch(
`https://users.roblox.com/v1/users/authenticated`,
{
@@ -25,7 +27,11 @@ export async function getLoggedInUser(): Promise<{
}
}
);
return (await data.json()) as any as {
const J = await data.json();
if (J.errors) {
return null;
}
return J as any as {
id: number;
name: string;
displayName: string;