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 5757 "storeCode" : " de" ,
5858 "disabled" : false ,
5959 "storeId" : 3 ,
60+ "websiteId" : 1 ,
6061 "name" : " German Store" ,
6162 "url" : " /de" ,
6263 "elasticsearch" : {
8788 "storeCode" : " it" ,
8889 "disabled" : false ,
8990 "storeId" : 4 ,
91+ "websiteId" : 1 ,
9092 "name" : " Italian Store" ,
9193 "url" : " /it" ,
9294 "elasticsearch" : {
Original file line number Diff line number Diff line change @@ -131,12 +131,14 @@ export default ({config, db}) => {
131131 */
132132 userApi . post ( '/reset-password' , ( req , res ) => {
133133 const userProxy = _getProxy ( req )
134+ const storeCode = req . query . storeCode
135+ const websiteId = config . storeViews [ storeCode ] . websiteId
134136
135137 if ( ! req . body . email ) {
136138 return apiStatus ( res , "Invalid e-mail provided!" , 500 )
137139 }
138140
139- userProxy . resetPassword ( { email : req . body . email , template : "email_reset" , websiteId : 1 } ) . then ( ( result ) => {
141+ userProxy . resetPassword ( { email : req . body . email , template : "email_reset" , websiteId : websiteId } ) . then ( ( result ) => {
140142 apiStatus ( res , result , 200 ) ;
141143 } ) . catch ( err => {
142144 apiError ( res , err ) ;
You can’t perform that action at this time.
0 commit comments