YiAi/YiAiQuickDeploy/dist/modules/auth/auth.controller.js
2024-02-06 13:43:30 +08:00

1 line
11 KiB
JavaScript

'use strict';const _0x308ac4=_0x47bb;function _0x47bb(_0x4b2254,_0x4b0fe7){const _0x37b33f=_0x37b3();return _0x47bb=function(_0x47bb97,_0xdcc6a1){_0x47bb97=_0x47bb97-0x136;let _0x2e2a1a=_0x37b33f[_0x47bb97];return _0x2e2a1a;},_0x47bb(_0x4b2254,_0x4b0fe7);}function _0x37b3(){const _0x5387f1=['用户手机号登录','Query','__decorate','object','metadata','registerByPhone','../../common/auth/jwtAuth.guard','Get','获取一个图形验证码','__metadata','LoginByPhoneDto','__esModule','../verification/dto/verifyCode.dto','413OBDiOH','./auth.service','VerifyCodeDto','6600xvXRpB','用户通过手机号注册','getInfo','registerSuccess','18260WXyPCd','UserRegisterDto','用户登录','./dto/updatePassByOther.dto','Post','design:paramtypes','获取用户个人信息','login','AuthService','JwtAuthGuard','UseGuards','registerError','注册成功页面','loginByPhone','4180AGHrQe','./dto/updatePassword.dto','@nestjs/common','1545414qRVaJa','design:type','UserRegisterByPhoneDto','activateAccount','4484ScEhdw','./dto/loginByPhone.dt','length','Req','captcha','decorate','4106682IXirej','defineProperty','@nestjs/swagger','UpdatePasswordDto','auth','用户更改密码','303XeoMyt','./dto/userRegisterByPhone.dto','Res','ApiOperation','UserLoginDto','Body','design:returntype','sendPhoneCode','updatePassByOther','用户注册','UpdatePassByOtherDto','注册失败页面','发送手机验证码','ApiBearerAuth','authService','function','./dto/authLogin.dto','getOwnPropertyDescriptor','updatePassword','register','Render','32456kKdwBI','4940540KrMygN','541aMSQzk','prototype'];_0x37b3=function(){return _0x5387f1;};return _0x37b3();}(function(_0x2cf0ae,_0x5f1f5e){const _0x530918=_0x47bb,_0x208f0b=_0x2cf0ae();while(!![]){try{const _0x462558=parseInt(_0x530918(0x144))/0x1*(-parseInt(_0x530918(0x16f))/0x2)+parseInt(_0x530918(0x17b))/0x3*(parseInt(_0x530918(0x15a))/0x4)+parseInt(_0x530918(0x143))/0x5+parseInt(_0x530918(0x16b))/0x6+-parseInt(_0x530918(0x153))/0x7*(-parseInt(_0x530918(0x142))/0x8)+parseInt(_0x530918(0x175))/0x9+parseInt(_0x530918(0x156))/0xa*(-parseInt(_0x530918(0x168))/0xb);if(_0x462558===_0x5f1f5e)break;else _0x208f0b['push'](_0x208f0b['shift']());}catch(_0x53fc11){_0x208f0b['push'](_0x208f0b['shift']());}}}(_0x37b3,0xe52b9));var __decorate=this&&this[_0x308ac4(0x148)]||function(_0x3861be,_0x7af32f,_0x5f6546,_0x3b5bf7){const _0x5c7082=_0x308ac4;var _0x5ece95=arguments[_0x5c7082(0x171)],_0x53fcfe=_0x5ece95<0x3?_0x7af32f:_0x3b5bf7===null?_0x3b5bf7=Object[_0x5c7082(0x13e)](_0x7af32f,_0x5f6546):_0x3b5bf7,_0x5471ed;if(typeof Reflect===_0x5c7082(0x149)&&typeof Reflect[_0x5c7082(0x174)]===_0x5c7082(0x13c))_0x53fcfe=Reflect[_0x5c7082(0x174)](_0x3861be,_0x7af32f,_0x5f6546,_0x3b5bf7);else{for(var _0x39af82=_0x3861be[_0x5c7082(0x171)]-0x1;_0x39af82>=0x0;_0x39af82--)if(_0x5471ed=_0x3861be[_0x39af82])_0x53fcfe=(_0x5ece95<0x3?_0x5471ed(_0x53fcfe):_0x5ece95>0x3?_0x5471ed(_0x7af32f,_0x5f6546,_0x53fcfe):_0x5471ed(_0x7af32f,_0x5f6546))||_0x53fcfe;}return _0x5ece95>0x3&&_0x53fcfe&&Object[_0x5c7082(0x176)](_0x7af32f,_0x5f6546,_0x53fcfe),_0x53fcfe;},__metadata=this&&this[_0x308ac4(0x14f)]||function(_0x56ce3f,_0x47352b){const _0x2a653d=_0x308ac4;if(typeof Reflect===_0x2a653d(0x149)&&typeof Reflect[_0x2a653d(0x14a)]===_0x2a653d(0x13c))return Reflect[_0x2a653d(0x14a)](_0x56ce3f,_0x47352b);},__param=this&&this['__param']||function(_0x1a8a06,_0x2c318e){return function(_0x20c761,_0x5b38e9){_0x2c318e(_0x20c761,_0x5b38e9,_0x1a8a06);};};Object[_0x308ac4(0x176)](exports,_0x308ac4(0x151),{'value':!![]}),exports['AuthController']=void 0x0;const verifyCode_dto_1=require(_0x308ac4(0x152)),authLogin_dto_1=require(_0x308ac4(0x13d)),common_1=require(_0x308ac4(0x16a)),jwtAuth_guard_1=require(_0x308ac4(0x14c)),auth_service_1=require(_0x308ac4(0x154)),swagger_1=require(_0x308ac4(0x177)),authRegister_dto_1=require('./dto/authRegister.dto'),updatePassword_dto_1=require(_0x308ac4(0x169)),updatePassByOther_dto_1=require(_0x308ac4(0x15d)),sendPhoneCode_dto_1=require('./dto/sendPhoneCode.dto'),userRegisterByPhone_dto_1=require(_0x308ac4(0x17c)),loginByPhone_dt_1=require(_0x308ac4(0x170));let AuthController=class AuthController{constructor(_0x1a2afb){const _0x15ec1f=_0x308ac4;this[_0x15ec1f(0x13b)]=_0x1a2afb;}async[_0x308ac4(0x140)](_0x3d9779,_0x1d9887){const _0x2d582e=_0x308ac4;return await this['authService'][_0x2d582e(0x140)](_0x3d9779,_0x1d9887);}async[_0x308ac4(0x14b)](_0x38e64c,_0x38539f){const _0x292e75=_0x308ac4;return await this[_0x292e75(0x13b)][_0x292e75(0x14b)](_0x38e64c,_0x38539f);}async[_0x308ac4(0x161)](_0x4b9913,_0x15964a){const _0x48cc7d=_0x308ac4;return this[_0x48cc7d(0x13b)][_0x48cc7d(0x161)](_0x4b9913,_0x15964a);}async[_0x308ac4(0x167)](_0x476611,_0x4fa2bf){const _0x3aee1b=_0x308ac4;return this[_0x3aee1b(0x13b)][_0x3aee1b(0x167)](_0x476611,_0x4fa2bf);}async[_0x308ac4(0x13f)](_0x373f4a,_0x4da6a0){const _0x346462=_0x308ac4;return this[_0x346462(0x13b)][_0x346462(0x13f)](_0x373f4a,_0x4da6a0);}async[_0x308ac4(0x183)](_0x47bdd9,_0x4e6b20){const _0x5fa0bd=_0x308ac4;return this[_0x5fa0bd(0x13b)]['updatePassByOther'](_0x47bdd9,_0x4e6b20);}async['getInfo'](_0xf07e24){const _0x1d7845=_0x308ac4;return this[_0x1d7845(0x13b)][_0x1d7845(0x158)](_0xf07e24);}async['activateAccount'](_0x16cd97,_0x323e16){const _0x311dc2=_0x308ac4;return this[_0x311dc2(0x13b)]['activateAccount'](_0x16cd97,_0x323e16);}async[_0x308ac4(0x159)](_0x49f398){const {username:_0x4da7cc,id:_0x9035ff,email:_0x33ea2f,teamName:_0x9312ed,registerSuccessEmailTitle:_0x334318,registerSuccessEmailTeamName:_0x12f5dd,registerSuccessEmaileAppend:_0x1f4c35}=_0x49f398;return{'username':_0x4da7cc,'id':_0x9035ff,'email':_0x33ea2f,'teamName':_0x9312ed,'registerSuccessEmailTitle':_0x334318,'registerSuccessEmailTeamName':_0x12f5dd,'registerSuccessEmaileAppend':_0x1f4c35};}async['registerError'](_0x1755d2){const {message:_0x3d4c3f,teamName:_0x42a60c,registerFailEmailTitle:_0x4a47b0,registerFailEmailTeamName:_0x5d8700}=_0x1755d2;return{'message':_0x3d4c3f,'teamName':_0x42a60c,'registerFailEmailTitle':_0x4a47b0,'registerFailEmailTeamName':_0x5d8700};}async[_0x308ac4(0x173)](_0x25ee92){const _0x310da2=_0x308ac4;return this[_0x310da2(0x13b)][_0x310da2(0x173)](_0x25ee92);}async[_0x308ac4(0x182)](_0x59a623){const _0x3a90be=_0x308ac4;return this[_0x3a90be(0x13b)][_0x3a90be(0x182)](_0x59a623);}};__decorate([(0x0,common_1[_0x308ac4(0x15e)])(_0x308ac4(0x140)),(0x0,swagger_1['ApiOperation'])({'summary':_0x308ac4(0x136)}),__param(0x0,(0x0,common_1[_0x308ac4(0x180)])()),__param(0x1,(0x0,common_1[_0x308ac4(0x172)])()),__metadata(_0x308ac4(0x16c),Function),__metadata('design:paramtypes',[authRegister_dto_1[_0x308ac4(0x15b)],Object]),__metadata(_0x308ac4(0x181),Promise)],AuthController[_0x308ac4(0x145)],_0x308ac4(0x140),null),__decorate([(0x0,common_1['Post'])('registerByPhone'),(0x0,swagger_1[_0x308ac4(0x17e)])({'summary':_0x308ac4(0x157)}),__param(0x0,(0x0,common_1[_0x308ac4(0x180)])()),__param(0x1,(0x0,common_1[_0x308ac4(0x172)])()),__metadata(_0x308ac4(0x16c),Function),__metadata('design:paramtypes',[userRegisterByPhone_dto_1[_0x308ac4(0x16d)],Object]),__metadata(_0x308ac4(0x181),Promise)],AuthController[_0x308ac4(0x145)],'registerByPhone',null),__decorate([(0x0,common_1[_0x308ac4(0x15e)])('login'),(0x0,swagger_1['ApiOperation'])({'summary':_0x308ac4(0x15c)}),__param(0x0,(0x0,common_1[_0x308ac4(0x180)])()),__param(0x1,(0x0,common_1[_0x308ac4(0x172)])()),__metadata('design:type',Function),__metadata(_0x308ac4(0x15f),[authLogin_dto_1[_0x308ac4(0x17f)],Object]),__metadata(_0x308ac4(0x181),Promise)],AuthController[_0x308ac4(0x145)],'login',null),__decorate([(0x0,common_1['Post'])(_0x308ac4(0x167)),(0x0,swagger_1[_0x308ac4(0x17e)])({'summary':_0x308ac4(0x146)}),__param(0x0,(0x0,common_1[_0x308ac4(0x180)])()),__param(0x1,(0x0,common_1[_0x308ac4(0x172)])()),__metadata(_0x308ac4(0x16c),Function),__metadata(_0x308ac4(0x15f),[loginByPhone_dt_1[_0x308ac4(0x150)],Object]),__metadata(_0x308ac4(0x181),Promise)],AuthController['prototype'],_0x308ac4(0x167),null),__decorate([(0x0,common_1['Post'])(_0x308ac4(0x13f)),(0x0,swagger_1[_0x308ac4(0x17e)])({'summary':_0x308ac4(0x17a)}),(0x0,common_1[_0x308ac4(0x164)])(jwtAuth_guard_1[_0x308ac4(0x163)]),(0x0,swagger_1[_0x308ac4(0x13a)])(),__param(0x0,(0x0,common_1[_0x308ac4(0x172)])()),__param(0x1,(0x0,common_1[_0x308ac4(0x180)])()),__metadata('design:type',Function),__metadata(_0x308ac4(0x15f),[Object,updatePassword_dto_1[_0x308ac4(0x178)]]),__metadata('design:returntype',Promise)],AuthController[_0x308ac4(0x145)],_0x308ac4(0x13f),null),__decorate([(0x0,common_1['Post'])(_0x308ac4(0x183)),(0x0,swagger_1[_0x308ac4(0x17e)])({'summary':_0x308ac4(0x17a)}),(0x0,common_1[_0x308ac4(0x164)])(jwtAuth_guard_1[_0x308ac4(0x163)]),(0x0,swagger_1[_0x308ac4(0x13a)])(),__param(0x0,(0x0,common_1[_0x308ac4(0x172)])()),__param(0x1,(0x0,common_1['Body'])()),__metadata(_0x308ac4(0x16c),Function),__metadata(_0x308ac4(0x15f),[Object,updatePassByOther_dto_1[_0x308ac4(0x137)]]),__metadata(_0x308ac4(0x181),Promise)],AuthController[_0x308ac4(0x145)],_0x308ac4(0x183),null),__decorate([(0x0,common_1[_0x308ac4(0x14d)])(_0x308ac4(0x158)),(0x0,swagger_1['ApiOperation'])({'summary':_0x308ac4(0x160)}),(0x0,common_1[_0x308ac4(0x164)])(jwtAuth_guard_1[_0x308ac4(0x163)]),(0x0,swagger_1[_0x308ac4(0x13a)])(),__param(0x0,(0x0,common_1['Req'])()),__metadata(_0x308ac4(0x16c),Function),__metadata(_0x308ac4(0x15f),[Object]),__metadata(_0x308ac4(0x181),Promise)],AuthController['prototype'],_0x308ac4(0x158),null),__decorate([(0x0,common_1[_0x308ac4(0x14d)])(_0x308ac4(0x16e)),(0x0,swagger_1[_0x308ac4(0x17e)])({'summary':'账户激活'}),__param(0x0,(0x0,common_1['Query'])()),__param(0x1,(0x0,common_1[_0x308ac4(0x17d)])()),__metadata(_0x308ac4(0x16c),Function),__metadata('design:paramtypes',[verifyCode_dto_1[_0x308ac4(0x155)],Object]),__metadata('design:returntype',Promise)],AuthController[_0x308ac4(0x145)],_0x308ac4(0x16e),null),__decorate([(0x0,common_1[_0x308ac4(0x14d)])(_0x308ac4(0x159)),(0x0,swagger_1['ApiOperation'])({'summary':_0x308ac4(0x166)}),(0x0,common_1[_0x308ac4(0x141)])(_0x308ac4(0x159)),__param(0x0,(0x0,common_1['Query'])()),__metadata(_0x308ac4(0x16c),Function),__metadata(_0x308ac4(0x15f),[Object]),__metadata(_0x308ac4(0x181),Promise)],AuthController[_0x308ac4(0x145)],'registerSuccess',null),__decorate([(0x0,common_1[_0x308ac4(0x14d)])(_0x308ac4(0x165)),(0x0,swagger_1[_0x308ac4(0x17e)])({'summary':_0x308ac4(0x138)}),(0x0,common_1[_0x308ac4(0x141)])(_0x308ac4(0x165)),__param(0x0,(0x0,common_1[_0x308ac4(0x147)])()),__metadata('design:type',Function),__metadata('design:paramtypes',[Object]),__metadata(_0x308ac4(0x181),Promise)],AuthController[_0x308ac4(0x145)],_0x308ac4(0x165),null),__decorate([(0x0,common_1['Post'])(_0x308ac4(0x173)),(0x0,swagger_1['ApiOperation'])({'summary':_0x308ac4(0x14e)}),__param(0x0,(0x0,common_1[_0x308ac4(0x180)])()),__metadata(_0x308ac4(0x16c),Function),__metadata(_0x308ac4(0x15f),[Object]),__metadata(_0x308ac4(0x181),Promise)],AuthController['prototype'],_0x308ac4(0x173),null),__decorate([(0x0,common_1[_0x308ac4(0x15e)])(_0x308ac4(0x182)),(0x0,swagger_1['ApiOperation'])({'summary':_0x308ac4(0x139)}),__param(0x0,(0x0,common_1[_0x308ac4(0x180)])()),__metadata(_0x308ac4(0x16c),Function),__metadata(_0x308ac4(0x15f),[sendPhoneCode_dto_1['SendPhoneCodeDto']]),__metadata(_0x308ac4(0x181),Promise)],AuthController[_0x308ac4(0x145)],_0x308ac4(0x182),null),AuthController=__decorate([(0x0,swagger_1['ApiTags'])(_0x308ac4(0x179)),(0x0,common_1['Controller'])(_0x308ac4(0x179)),__metadata('design:paramtypes',[auth_service_1[_0x308ac4(0x162)]])],AuthController),exports['AuthController']=AuthController;