mirror of
https://github.com/hay-kot/homebox.git
synced 2025-06-11 23:02:28 +00:00
feat: add scheduled maintenance tasks (#320)
* add scheduled maintenance tasks * fix failing typecheck
This commit is contained in:
parent
70297b9d27
commit
025521431e
25 changed files with 521 additions and 121 deletions
|
@ -59,9 +59,14 @@ export class FieldsAPI extends BaseAPI {
|
|||
}
|
||||
}
|
||||
|
||||
type MaintenanceEntryQuery = {
|
||||
scheduled?: boolean;
|
||||
completed?: boolean;
|
||||
};
|
||||
|
||||
export class MaintenanceAPI extends BaseAPI {
|
||||
getLog(itemId: string) {
|
||||
return this.http.get<MaintenanceLog>({ url: route(`/items/${itemId}/maintenance`) });
|
||||
getLog(itemId: string, q: MaintenanceEntryQuery = {}) {
|
||||
return this.http.get<MaintenanceLog>({ url: route(`/items/${itemId}/maintenance`, q) });
|
||||
}
|
||||
|
||||
create(itemId: string, data: MaintenanceEntryCreate) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue