mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-24 06:28:34 +01:00
labels create and get
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user