diff options
Diffstat (limited to 'src/api/server/ServerApi.js')
-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 a9ce202ff..f56c7b6e4 100644 --- a/src/api/server/ServerApi.js +++ b/src/api/server/ServerApi.js | |||
@@ -77,6 +77,20 @@ export default class ServerApi { | |||
77 | return u.token; | 77 | return u.token; |
78 | } | 78 | } |
79 | 79 | ||
80 | async activateTrial(data) { | ||
81 | const request = await sendAuthRequest(`${API_URL}/payment/trial`, { | ||
82 | method: 'POST', | ||
83 | body: JSON.stringify(data), | ||
84 | }); | ||
85 | if (!request.ok) { | ||
86 | throw request; | ||
87 | } | ||
88 | const trial = await request.json(); | ||
89 | |||
90 | debug('ServerApi::signup resolves', trial); | ||
91 | return true; | ||
92 | } | ||
93 | |||
80 | async inviteUser(data) { | 94 | async inviteUser(data) { |
81 | const request = await sendAuthRequest(`${API_URL}/invite`, { | 95 | const request = await sendAuthRequest(`${API_URL}/invite`, { |
82 | method: 'POST', | 96 | method: 'POST', |
@@ -469,7 +483,7 @@ export default class ServerApi { | |||
469 | return services; | 483 | return services; |
470 | } | 484 | } |
471 | } catch (err) { | 485 | } catch (err) { |
472 | throw (new Error('ServerApi::getLegacyServices no config found')); | 486 | console.error('ServerApi::getLegacyServices no config found'); |
473 | } | 487 | } |
474 | 488 | ||
475 | return []; | 489 | return []; |