forked from mirrors/homebox
ui cleanup
This commit is contained in:
parent
bf2ad30609
commit
6263278ff5
14 changed files with 253 additions and 130 deletions
|
@ -28,17 +28,20 @@ export type StatusResult = {
|
|||
|
||||
export class PublicApi extends BaseAPI {
|
||||
public status() {
|
||||
return this.http.get<StatusResult>(route('/status'));
|
||||
return this.http.get<StatusResult>({ url: route('/status') });
|
||||
}
|
||||
|
||||
public login(username: string, password: string) {
|
||||
return this.http.post<LoginPayload, LoginResult>(route('/users/login'), {
|
||||
username,
|
||||
password,
|
||||
return this.http.post<LoginPayload, LoginResult>({
|
||||
url: route('/users/login'),
|
||||
body: {
|
||||
username,
|
||||
password,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
public register(payload: RegisterPayload) {
|
||||
return this.http.post<RegisterPayload, LoginResult>(route('/users/register'), payload);
|
||||
public register(body: RegisterPayload) {
|
||||
return this.http.post<RegisterPayload, LoginResult>({ url: route('/users/register'), body });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue