mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-23 00:55:43 +00:00
d6da63187b
* add date format and orDefault helpers * introduce new statistics calculations queries * rework statistics endpoints * code generation * fix styles on photo card * label and location aggregation endpoints * code-gen * cleanup parser and defaults * remove debug point * setup E2E Testing * linters * formatting * fmt plus name support on time series data * code gen
24 lines
599 B
TypeScript
24 lines
599 B
TypeScript
import { BaseAPI, route } from "../base";
|
|
import { Group, GroupInvitation, GroupInvitationCreate, GroupUpdate } from "../types/data-contracts";
|
|
|
|
export class GroupApi extends BaseAPI {
|
|
createInvitation(data: GroupInvitationCreate) {
|
|
return this.http.post<GroupInvitationCreate, GroupInvitation>({
|
|
url: route("/groups/invitations"),
|
|
body: data,
|
|
});
|
|
}
|
|
|
|
update(data: GroupUpdate) {
|
|
return this.http.put<GroupUpdate, Group>({
|
|
url: route("/groups"),
|
|
body: data,
|
|
});
|
|
}
|
|
|
|
get() {
|
|
return this.http.get<Group>({
|
|
url: route("/groups"),
|
|
});
|
|
}
|
|
}
|