32 lines
530 B
TypeScript
32 lines
530 B
TypeScript
import axios from "axios";
|
|
|
|
export class Account
|
|
{
|
|
firstname?: string;
|
|
lastname?: string;
|
|
username?: string;
|
|
email?: string;
|
|
password?: string;
|
|
roles?: string[];
|
|
initial?: boolean;
|
|
|
|
static get(onSuccess: (account: Account) => void)
|
|
{
|
|
|
|
}
|
|
|
|
static create(user: AccountCreation, onSuccess: () => void)
|
|
{
|
|
|
|
}
|
|
}
|
|
|
|
export class AccountCreation
|
|
{
|
|
firstname?: string;
|
|
lastname?: string;
|
|
email?: string;
|
|
password?: string;
|
|
username?: string;
|
|
role: string = "USER";
|
|
} |