@gudhub/core 1.1.119 → 1.1.121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,46 +0,0 @@
1
- import axios from "axios";
2
-
3
- class GroupInvitation {
4
- constructor(token, baseURL = "http://localhost") {
5
- this.token = token;
6
-
7
- this.api = axios.create({
8
- baseURL
9
- });
10
- }
11
-
12
- groupInvitationCreate(sharing_groups, actions) {
13
- return this.api.post("invitation/create", {
14
- sharing_groups,
15
- actions,
16
- token: this.token
17
- })
18
- .then(res => res.data)
19
- .catch(error => {
20
- throw error.response?.data || error;
21
- });
22
- }
23
-
24
- groupInvitationGet(invitation_id) {
25
- return this.api.get("invitation/get", {
26
- params: { invitation_id }
27
- })
28
- .then(res => res.data)
29
- .catch(error => {
30
- throw error.response?.data || error;
31
- });
32
- }
33
-
34
- groupInvitationAccept(invitation_id) {
35
- return this.api.post("invitation/accept", {
36
- invitation_id,
37
- token: this.token
38
- })
39
- .then(res => res.data)
40
- .catch(error => {
41
- throw error.response?.data || error;
42
- });
43
- }
44
- }
45
-
46
- export default GroupInvitation;