forked from mirrors/homebox
frontend: cleanup
* dummy commit * cleanup workflows * setup and run eslint * add linter to CI * use eslint for formatting * reorder rules * drop editor config
This commit is contained in:
parent
78fa714297
commit
75c633dcb5
65 changed files with 2048 additions and 641 deletions
|
@ -1,4 +1,4 @@
|
|||
import { BaseAPI, route } from './base';
|
||||
import { BaseAPI, route } from "./base";
|
||||
|
||||
export type LoginResult = {
|
||||
token: string;
|
||||
|
@ -28,12 +28,12 @@ export type StatusResult = {
|
|||
|
||||
export class PublicApi extends BaseAPI {
|
||||
public status() {
|
||||
return this.http.get<StatusResult>({ url: route('/status') });
|
||||
return this.http.get<StatusResult>({ url: route("/status") });
|
||||
}
|
||||
|
||||
public login(username: string, password: string) {
|
||||
return this.http.post<LoginPayload, LoginResult>({
|
||||
url: route('/users/login'),
|
||||
url: route("/users/login"),
|
||||
body: {
|
||||
username,
|
||||
password,
|
||||
|
@ -42,6 +42,6 @@ export class PublicApi extends BaseAPI {
|
|||
}
|
||||
|
||||
public register(body: RegisterPayload) {
|
||||
return this.http.post<RegisterPayload, LoginResult>({ url: route('/users/register'), body });
|
||||
return this.http.post<RegisterPayload, LoginResult>({ url: route("/users/register"), body });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue