Update movement dialog is operational
This commit is contained in:
@ -39,12 +39,14 @@ export class MovementApi {
|
||||
/**
|
||||
* Create a new movement
|
||||
*/
|
||||
static async Create(q: MovementUpdate): Promise<void> {
|
||||
await APIClient.exec({
|
||||
uri: `/movement`,
|
||||
method: "POST",
|
||||
jsonData: q,
|
||||
});
|
||||
static async Create(q: MovementUpdate): Promise<Movement> {
|
||||
return (
|
||||
await APIClient.exec({
|
||||
uri: `/movement`,
|
||||
method: "POST",
|
||||
jsonData: q,
|
||||
})
|
||||
).data;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -97,7 +99,9 @@ export class MovementApi {
|
||||
/**
|
||||
* Update a movement information
|
||||
*/
|
||||
static async Update(movement: Movement): Promise<Movement> {
|
||||
static async Update(
|
||||
movement: MovementUpdate & { id: number }
|
||||
): Promise<Movement> {
|
||||
return (
|
||||
await APIClient.exec({
|
||||
uri: `/movement/${movement.id}`,
|
||||
|
Reference in New Issue
Block a user