labels create and get

This commit is contained in:
Hayden 2022-09-01 17:52:40 -08:00
parent f956ec8eb2
commit 8ece3bd7bf
24 changed files with 850 additions and 132 deletions

View file

@ -1,4 +1,4 @@
import { BaseAPI, UrlBuilder } from "./base";
import { BaseAPI, UrlBuilder } from './base';
export type LoginResult = {
token: string;
@ -21,19 +21,13 @@ export type RegisterPayload = {
export class PublicApi extends BaseAPI {
public login(username: string, password: string) {
return this.http.post<LoginPayload, LoginResult>(
UrlBuilder("/users/login"),
{
username,
password,
}
);
return this.http.post<LoginPayload, LoginResult>(UrlBuilder('/users/login'), {
username,
password,
});
}
public register(payload: RegisterPayload) {
return this.http.post<RegisterPayload, LoginResult>(
UrlBuilder("/users/register"),
payload
);
return this.http.post<RegisterPayload, LoginResult>(UrlBuilder('/users/register'), payload);
}
}