30 lines
540 B
TypeScript
30 lines
540 B
TypeScript
import {type AxiosResponse} from "axios";
|
|
import type {Account} from "~/auth/Account";
|
|
|
|
export class Session
|
|
{
|
|
static baseURL = "http://localhost:8089";
|
|
static COOKIE = "session";
|
|
|
|
constructor(
|
|
public user: Account,
|
|
public token: string
|
|
)
|
|
{
|
|
}
|
|
|
|
static create(sessionCreation: SessionCreation, onSuccess: (token: string) => void, onError: () => void)
|
|
{
|
|
|
|
}
|
|
}
|
|
|
|
export class SessionCreation
|
|
{
|
|
constructor(
|
|
public email?: string,
|
|
public password?: string
|
|
)
|
|
{
|
|
}
|
|
} |