forked from mirrors/homebox
ui cleanup
This commit is contained in:
parent
bf2ad30609
commit
6263278ff5
14 changed files with 253 additions and 130 deletions
|
@ -16,22 +16,22 @@ export type Label = LabelCreate &
|
|||
|
||||
export class LabelsApi extends BaseAPI {
|
||||
async getAll() {
|
||||
return this.http.get<Results<Label>>(route('/labels'));
|
||||
return this.http.get<Results<Label>>({ url: route('/labels') });
|
||||
}
|
||||
|
||||
async create(label: LabelCreate) {
|
||||
return this.http.post<LabelCreate, Label>(route('/labels'), label);
|
||||
async create(body: LabelCreate) {
|
||||
return this.http.post<LabelCreate, Label>({ url: route('/labels'), body });
|
||||
}
|
||||
|
||||
async get(id: string) {
|
||||
return this.http.get<Label>(route(`/labels/${id}`));
|
||||
return this.http.get<Label>({ url: route(`/labels/${id}`) });
|
||||
}
|
||||
|
||||
async delete(id: string) {
|
||||
return this.http.delete<void>(route(`/labels/${id}`));
|
||||
return this.http.delete<void>({ url: route(`/labels/${id}`) });
|
||||
}
|
||||
|
||||
async update(id: string, label: LabelUpdate) {
|
||||
return this.http.put<LabelUpdate, Label>(route(`/labels/${id}`), label);
|
||||
async update(id: string, body: LabelUpdate) {
|
||||
return this.http.put<LabelUpdate, Label>({ url: route(`/labels/${id}`), body });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue