feat: add more User props
This commit is contained in:
parent
92a98064e5
commit
53fc8bb6e3
@ -30,15 +30,18 @@ export async function apiAuth(
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type User = {
|
export type User = {
|
||||||
|
id: number;
|
||||||
username: string;
|
username: string;
|
||||||
|
display_name: string;
|
||||||
full_name: string;
|
full_name: string;
|
||||||
email: string;
|
email: string;
|
||||||
player_id: number;
|
player_id: number;
|
||||||
|
number: string;
|
||||||
scopes: string;
|
scopes: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function currentUser(): Promise<User> {
|
export async function currentUser(): Promise<User> {
|
||||||
const req = new Request(`${baseUrl}api/users/me/`, {
|
const req = new Request(`${baseUrl}api/player/me`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user