another update

This commit is contained in:
2025-07-24 00:48:27 +03:00
parent dfc8e21db1
commit e0217cbbcb
75 changed files with 5331 additions and 4457 deletions

View File

@@ -1,41 +1,48 @@
import { getCookie } from "./roblox"
import { proxyFetch } from "./utils"
import { proxyFetch } from "./utils";
export type UserProfileDetails = {
description: string,
created: Date,
isBanned: boolean,
externalAppDisplayName: string,
hasVerifiedBadge: boolean,
id: number,
name: string,
displayName: string
}
description: string;
created: Date;
isBanned: boolean;
externalAppDisplayName: string;
hasVerifiedBadge: boolean;
id: number;
name: string;
displayName: string;
};
export async function getLoggedInUser(): Promise<{
id: number,
name: string,
displayName: string
id: number;
name: string;
displayName: string;
}> {
const data = await proxyFetch(`https://users.roblox.com/v1/users/authenticated`, {
method: "GET",
headers: {
"Content-Type": "application/json"
const data = await proxyFetch(
`https://users.roblox.com/v1/users/authenticated`,
{
method: "GET",
headers: {
"Content-Type": "application/json"
}
}
})
return (await data.json() as any) as {
id: number,
name: string,
displayName: string
}
);
return (await data.json()) as any as {
id: number;
name: string;
displayName: string;
};
}
export async function getUserByUserId(userid: string): Promise<UserProfileDetails> {
const data = await proxyFetch(`https://users.roblox.com/v1/users/${userid}`, {
method: "GET",
headers: {
"Content-Type": "application/json"
export async function getUserByUserId(
userid: string
): Promise<UserProfileDetails> {
const data = await proxyFetch(
`https://users.roblox.com/v1/users/${userid}`,
{
method: "GET",
headers: {
"Content-Type": "application/json"
}
}
})
return (await data.json() as any) as UserProfileDetails
}
);
return (await data.json()) as any as UserProfileDetails;
}