This repository was archived by the owner on May 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 6262 "storeCode" : " de" ,
6363 "disabled" : false ,
6464 "storeId" : 3 ,
65+ "websiteId" : 1 ,
6566 "name" : " German Store" ,
6667 "url" : " /de" ,
6768 "elasticsearch" : {
9697 "storeCode" : " it" ,
9798 "disabled" : false ,
9899 "storeId" : 4 ,
100+ "websiteId" : 1 ,
99101 "name" : " Italian Store" ,
100102 "url" : " /it" ,
101103 "elasticsearch" : {
Original file line number Diff line number Diff line change @@ -119,12 +119,14 @@ export default ({config, db}) => {
119119 */
120120 userApi . post ( '/reset-password' , ( req , res ) => {
121121 const userProxy = _getProxy ( req )
122+ const storeCode = req . query . storeCode
123+ const websiteId = config . storeViews [ storeCode ] . websiteId
122124
123125 if ( ! req . body . email ) {
124126 return apiStatus ( res , 'Invalid e-mail provided!' , 500 )
125127 }
126128
127- userProxy . resetPassword ( { email : req . body . email , template : ' email_reset' , websiteId : 1 } ) . then ( ( result ) => {
129+ userProxy . resetPassword ( { email : req . body . email , template : " email_reset" , websiteId } ) . then ( ( result ) => {
128130 apiStatus ( res , result , 200 ) ;
129131 } ) . catch ( err => {
130132 apiError ( res , err ) ;
You can’t perform that action at this time.
0 commit comments