2019-12-08 00:32:00 +05:30
|
|
|
import request from 'app/services/request';
|
2016-07-28 10:33:30 +05:30
|
|
|
|
2019-12-07 16:58:52 +05:30
|
|
|
import { OAuthResponse } from './authentication';
|
|
|
|
|
2016-07-28 10:33:30 +05:30
|
|
|
export default {
|
2019-11-27 14:33:32 +05:30
|
|
|
register({
|
|
|
|
email = '',
|
|
|
|
username = '',
|
|
|
|
password = '',
|
|
|
|
rePassword = '',
|
|
|
|
rulesAgreement = false,
|
|
|
|
lang = '',
|
|
|
|
captcha = '',
|
|
|
|
}) {
|
|
|
|
return request.post(
|
|
|
|
'/api/signup',
|
|
|
|
{ email, username, password, rePassword, rulesAgreement, lang, captcha },
|
|
|
|
{ token: null },
|
|
|
|
);
|
|
|
|
},
|
2016-07-28 10:33:30 +05:30
|
|
|
|
2019-11-27 14:33:32 +05:30
|
|
|
activate({ key = '' }) {
|
2019-12-07 16:58:52 +05:30
|
|
|
return request.post<OAuthResponse>(
|
|
|
|
'/api/signup/confirm',
|
|
|
|
{ key },
|
|
|
|
{ token: null },
|
|
|
|
);
|
2019-11-27 14:33:32 +05:30
|
|
|
},
|
2016-07-28 10:33:30 +05:30
|
|
|
|
2019-11-27 14:33:32 +05:30
|
|
|
resendActivation({ email = '', captcha }) {
|
|
|
|
return request.post('/api/signup/repeat-message', { email, captcha });
|
|
|
|
},
|
2016-07-28 10:33:30 +05:30
|
|
|
};
|