mirror of
https://github.com/hay-kot/homebox.git
synced 2024-12-19 13:36:29 +00:00
b77c9be36f
* bump prettier/eslint-plugin * bump nuxt pwa * use typed imports * set vue version to fix layout errors * disable import
36 lines
747 B
TypeScript
36 lines
747 B
TypeScript
import { BaseAPI, route } from "../base";
|
|
import type {
|
|
CurrenciesCurrency,
|
|
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"),
|
|
});
|
|
}
|
|
|
|
currencies() {
|
|
return this.http.get<CurrenciesCurrency[]>({
|
|
url: route("/currencies"),
|
|
});
|
|
}
|
|
}
|