2022-10-07 02:54:09 +00:00
|
|
|
import { BaseAPI, route } from "../base";
|
2022-12-05 21:36:32 +00:00
|
|
|
import { Group, GroupInvitation, GroupInvitationCreate, GroupUpdate } from "../types/data-contracts";
|
2022-10-07 02:54:09 +00:00
|
|
|
|
|
|
|
export class GroupApi extends BaseAPI {
|
|
|
|
createInvitation(data: GroupInvitationCreate) {
|
|
|
|
return this.http.post<GroupInvitationCreate, GroupInvitation>({
|
|
|
|
url: route("/groups/invitations"),
|
|
|
|
body: data,
|
|
|
|
});
|
|
|
|
}
|
2022-10-15 20:15:55 +00:00
|
|
|
|
|
|
|
update(data: GroupUpdate) {
|
|
|
|
return this.http.put<GroupUpdate, Group>({
|
|
|
|
url: route("/groups"),
|
|
|
|
body: data,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
get() {
|
|
|
|
return this.http.get<Group>({
|
|
|
|
url: route("/groups"),
|
|
|
|
});
|
|
|
|
}
|
2022-10-07 02:54:09 +00:00
|
|
|
}
|