From 55ac568d98c1dcb3ede039f813515c682466a698 Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Tue, 5 Aug 2025 12:08:35 +0530 Subject: [PATCH] Base url defined : GWM --- main.go | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/main.go b/main.go index a43ccc9..f81ca69 100755 --- a/main.go +++ b/main.go @@ -34,6 +34,8 @@ import ( "google.golang.org/api/option" ) +const baseUrl = "https://pb.venbait.in" + type EmailConfigurationResponse struct { Page int `json:"page"` PerPage int `json:"perPage"` @@ -615,7 +617,7 @@ func main() { // Send email subject := "Reset your FCSC password" // resetURL := fmt.Sprintf("%s/api/auth/reset-password?token=%s", baseUrl, token) - //https://fcscapp.onelink.me/forgot-password/surendar.m@venbainfotech.com + resetURL := fmt.Sprintf("https://fcscapp.onelink.me/forgot-password/%s", email) body := fmt.Sprintf(` @@ -1637,7 +1639,7 @@ func main() { subject := "FCSC Verify Your Email to Complete Registration" // Generate a verification URL (example: using user ID or token) - verificationURL := fmt.Sprintf("https://pb.venbait.in/verify-email?userId=%s", userID) + verificationURL := fmt.Sprintf("%s/verify-email?userId=%s", baseUrl, userID) // Email body body := fmt.Sprintf(` @@ -2286,8 +2288,6 @@ func main() { } } -const baseUrl = "https://pb.venbait.in" - // generateOTP generates a random 4-digit OTP func generateOTP() (int, error) { max := big.NewInt(10000) // 4-digit numbers range: 0000 to 9999 @@ -2451,6 +2451,7 @@ func verifyEmailHandler(c echo.Context) error { } func sendAdminEmail(app *pocketbase.PocketBase, userID, username, userEmail string) error { + adminName := "Admin" subject := "New User Registration Pending Review" @@ -2500,8 +2501,8 @@ func sendAdminEmail(app *pocketbase.PocketBase, userID, username, userEmail stri Please review the registration and take appropriate action.

- Approve ✅ - Reject ❌ + Approve ✅ + Reject ❌
@@ -2514,8 +2515,8 @@ func sendAdminEmail(app *pocketbase.PocketBase, userID, username, userEmail stri يرجى مراجعة التسجيل واتخاذ الإجراء المناسب.

- Approve ✅ - Reject ❌ + Approve ✅ + Reject ❌
@@ -2541,8 +2542,8 @@ func sendAdminEmail(app *pocketbase.PocketBase, userID, username, userEmail stri `, - adminName, username, userEmail, userEmail, userID, userID, - adminName, username, userEmail, userEmail, userID, userID) + adminName, username, userEmail, userEmail, baseUrl, userID, baseUrl, userID, + adminName, username, userEmail, userEmail, baseUrl, userID, baseUrl, userID) // Send email message := &mailer.Message{