diff options
Diffstat (limited to 'src/api/server')
-rw-r--r-- | src/api/server/ServerApi.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/api/server/ServerApi.js b/src/api/server/ServerApi.js index efac5ca19..293fcda26 100644 --- a/src/api/server/ServerApi.js +++ b/src/api/server/ServerApi.js | |||
@@ -76,6 +76,20 @@ export default class ServerApi { | |||
76 | return u.token; | 76 | return u.token; |
77 | } | 77 | } |
78 | 78 | ||
79 | async activateTrial(data) { | ||
80 | const request = await sendAuthRequest(`${API_URL}/payment/trial`, { | ||
81 | method: 'POST', | ||
82 | body: JSON.stringify(data), | ||
83 | }); | ||
84 | if (!request.ok) { | ||
85 | throw request; | ||
86 | } | ||
87 | const trial = await request.json(); | ||
88 | |||
89 | debug('ServerApi::signup resolves', trial); | ||
90 | return true; | ||
91 | } | ||
92 | |||
79 | async inviteUser(data) { | 93 | async inviteUser(data) { |
80 | const request = await sendAuthRequest(`${apiBase()}/invite`, { | 94 | const request = await sendAuthRequest(`${apiBase()}/invite`, { |
81 | method: 'POST', | 95 | method: 'POST', |
@@ -468,7 +482,7 @@ export default class ServerApi { | |||
468 | return services; | 482 | return services; |
469 | } | 483 | } |
470 | } catch (err) { | 484 | } catch (err) { |
471 | throw (new Error('ServerApi::getLegacyServices no config found')); | 485 | console.error('ServerApi::getLegacyServices no config found'); |
472 | } | 486 | } |
473 | 487 | ||
474 | return []; | 488 | return []; |