Can create movements from UI
This commit is contained in:
@ -4,6 +4,15 @@ export interface Balances {
|
||||
[key: number]: number;
|
||||
}
|
||||
|
||||
export interface MovementUpdate {
|
||||
account_id: number;
|
||||
time: number;
|
||||
label: String;
|
||||
file_id?: number;
|
||||
amount: number;
|
||||
checked: boolean;
|
||||
}
|
||||
|
||||
export class MovementApi {
|
||||
/**
|
||||
* Get all accounts balances
|
||||
@ -16,4 +25,15 @@ export class MovementApi {
|
||||
})
|
||||
).data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new movement
|
||||
*/
|
||||
static async Create(q: MovementUpdate): Promise<void> {
|
||||
await APIClient.exec({
|
||||
uri: `/movement`,
|
||||
method: "POST",
|
||||
jsonData: q,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ export interface ServerConstraints {
|
||||
token_name: LenConstraint;
|
||||
token_ip_net: LenConstraint;
|
||||
token_max_inactivity: LenConstraint;
|
||||
account_name: LenConstraint;
|
||||
movement_label: LenConstraint;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user