mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-11 15:59:06 +05:30
34 lines
707 B
TypeScript
34 lines
707 B
TypeScript
import request from 'app/services/request';
|
|
|
|
import { OAuthResponse } from './authentication';
|
|
|
|
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 },
|
|
);
|
|
},
|
|
|
|
activate({ key = '' }) {
|
|
return request.post<OAuthResponse>(
|
|
'/api/signup/confirm',
|
|
{ key },
|
|
{ token: null },
|
|
);
|
|
},
|
|
|
|
resendActivation({ email = '', captcha }) {
|
|
return request.post('/api/signup/repeat-message', { email, captcha });
|
|
},
|
|
};
|