forked from mirrors/homebox
461be2afca
* initial UI for currency selection * add task to purge invitation tokens * group API contracts * fix type import * use auth middleware * add currency setting support (UI) * use group settings for format currency * fix casing
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"),
|
|
});
|
|
}
|
|
}
|