Refactor environment module: Rename enviroment to environment and consolidate environment configuration management
- Updated all references from `enviroment` to `environment` across the codebase. - Removed the old `enviroment` module and replaced it with a new `environment` module that includes centralized configuration management. - Enhanced OTP generation to include secure hashing and expiration handling. - Improved CSRF token generation and validation with better error handling. - Cleaned up logging statements in various modules for clarity and consistency. - Updated response formatting to include versioning from Cargo.toml. - Removed unused mock test module from utils.
This commit is contained in:
@@ -187,11 +187,11 @@ impl MentorsService {
|
||||
let otp = imphnen_utils::generate_otp::OtpManager::generate_otp();
|
||||
|
||||
match auth_repo
|
||||
.query_store_otp(final_user_email.clone(), otp)
|
||||
.query_store_otp(final_user_email.clone(), otp.clone())
|
||||
.await
|
||||
{
|
||||
Ok(_) => {
|
||||
let message = format!("your otp code is {otp}");
|
||||
let message = format!("your otp code is {}", otp.code);
|
||||
if let Err(_err) =
|
||||
imphnen_utils::send_email(&final_user_email, "OTP Verification", &message)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user