ui cleanup

This commit is contained in:
Hayden 2022-09-08 22:05:23 -08:00
parent bf2ad30609
commit 6263278ff5
14 changed files with 253 additions and 130 deletions

View file

@ -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 });
}
}