Skip to content

Commit

Permalink
Merge branch 'main' into userModels
Browse files Browse the repository at this point in the history
  • Loading branch information
ArinNigam authored Feb 3, 2024
2 parents d28aeb8 + f97f117 commit 8310bb0
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
**/.DS_Store

.vscode/easycode.ignore
## Backend ignored file (Root level)
backend/.DS_Store
node_modules/
Expand Down
13 changes: 0 additions & 13 deletions .vscode/easycode.ignore

This file was deleted.

1 change: 0 additions & 1 deletion backend/constants/mailOption.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export const senderEmail = '[email protected]';
export const subjectOTPLogin = 'OTP for Login';

export function createOTPEmailBody(otp) {
Expand Down
2 changes: 1 addition & 1 deletion backend/resources/otpResource.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ otpRouter.post('/send-otp', async (req, res) => {
// Store OTP with the associated email
otpStorage.set(email, otp);
const mailOptions = {
from: mailOption.senderEmail,
from: process.env.SENDER_EMAIL,
to: email,
subject: mailOption.subjectOTPLogin,
text: mailOption.createOTPEmailBody(otp)
Expand Down
6 changes: 2 additions & 4 deletions frontend/lib/constants/constants.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:email_validator/email_validator.dart';
import 'package:flutter/material.dart';

class AppConstants {
Expand Down Expand Up @@ -137,8 +136,7 @@ class MessMenuConstants {
];

static final List<Text> mealTypes = [
Text('Breakfast',
style: TextStyle(color: Colors.teal.shade900, fontSize: 14)),
Text('Breakfast', style: TextStyle(color: Colors.teal.shade900, fontSize: 14)),
Text('Lunch', style: TextStyle(color: Colors.teal.shade900, fontSize: 14)),
Text('Snacks', style: TextStyle(color: Colors.teal.shade900, fontSize: 14)),
Text('Dinner', style: TextStyle(color: Colors.teal.shade900, fontSize: 14)),
Expand All @@ -160,7 +158,7 @@ class Validators {
if (value == null || value.isEmpty) {
return "Email cannot be empty";
}
if (!EmailValidator.validate(value)) {
if (!RegExp(r"^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+$").hasMatch(value)) {
return "Invalid email";
}
return null;
Expand Down
8 changes: 0 additions & 8 deletions frontend/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.0"
email_validator:
dependency: "direct main"
description:
name: email_validator
sha256: e9a90f27ab2b915a27d7f9c2a7ddda5dd752d6942616ee83529b686fc086221b
url: "https://pub.dev"
source: hosted
version: "2.1.17"
fake_async:
dependency: transitive
description:
Expand Down
1 change: 0 additions & 1 deletion frontend/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ dependencies:
grouped_list: ^5.1.2
slide_switcher: ^1.1.2
awesome_snackbar_content: ^0.1.1
email_validator: ^2.1.17
delightful_toast: ^1.1.0

dev_dependencies:
Expand Down

0 comments on commit 8310bb0

Please sign in to comment.