mirror of
				https://github.com/xfarrow/blink
				synced 2025-06-27 09:03:02 +02:00 
			
		
		
		
	Update reset_password_model.js
This commit is contained in:
		| @@ -35,7 +35,7 @@ async function findBySecret(secret) { | |||||||
|  * @returns  |  * @returns  | ||||||
|  */ |  */ | ||||||
| async function resetPassword(password, secret) { | async function resetPassword(password, secret) { | ||||||
|     const request = await findBySecret(secret); |     const request = await findBySecret(secret); //TODO should we avoid another db call by directly passing the email? | ||||||
|     if (!request) { |     if (!request) { | ||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
| @@ -46,6 +46,7 @@ async function resetPassword(password, secret) { | |||||||
|             password |             password | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|  |         // Delete all the requests associated with that e-mail | ||||||
|         await tr('RequestResetPassword').where({ |         await tr('RequestResetPassword').where({ | ||||||
|             email |             email | ||||||
|         }).del(); |         }).del(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user