accounts-frontend/src/services/api/signup.js

28 lines
612 B
JavaScript
Raw Normal View History

2016-07-28 10:33:30 +05:30
import request from 'services/request';
export default {
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
activate({ key = '' }) {
return request.post('/api/signup/confirm', { key }, { token: null });
},
2016-07-28 10:33:30 +05:30
resendActivation({ email = '', captcha }) {
return request.post('/api/signup/repeat-message', { email, captcha });
},
2016-07-28 10:33:30 +05:30
};