Skip to content

Commit a0b39e9

Browse files
fix: add logs, fix docker compose.
1 parent b1f7412 commit a0b39e9

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

docker-compose.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22

33
services:
44
auth:
5-
image: ghcr.io/evolutionary-algorithms-on-click/auth_microservice:main
5+
# image: ghcr.io/evolutionary-algorithms-on-click/auth_microservice:main
6+
build:
7+
context: .
8+
dockerfile: Dockerfile
69
ports:
710
- "5000:5000"
811
- "5001:5001"
912
environment:
10-
DATABASE_URL : postgresql://[email protected]:26257/defaultdb?sslmode=disable
11-
MAILER_EMAIL : <mailer-email>
12-
MAILER_PASSWORD : <mailer-password>
13-
FRONTEND_URL : http://localhost:3000
14-
HTTP_PORT : 5000
15-
GRPC_PORT : 5001
16-
13+
DATABASE_URL: postgresql://[email protected]:26257/defaultdb?sslmode=disable
14+
MAILER_EMAIL: <mailer-email>
15+
MAILER_PASSWORD: <mailer-password>
16+
FRONTEND_URL: http://localhost:3000
17+
HTTP_PORT: 5000
18+
GRPC_PORT: 5001
19+
ENV: DEVELOPMENT

modules/resetpassword/request.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66

77
"evolve/db/connection"
8+
"evolve/util"
89
"evolve/util/auth"
910
"evolve/util/db/resetpassword"
1011
dbutil "evolve/util/db/user"
@@ -13,6 +14,8 @@ import (
1314

1415
// RequestPasswordReset generates and sends OTP for password reset
1516
func RequestPasswordReset(ctx context.Context, email string) error {
17+
logger := util.SharedLogger
18+
1619
// Get database connection
1720
db, err := connection.PoolConn(ctx)
1821
if err != nil {
@@ -26,6 +29,7 @@ func RequestPasswordReset(ctx context.Context, email string) error {
2629
// OTP page should show a message that OTP would've come to your email
2730
// "if you are a registered user. If OTP did not come,
2831
// check the email you entered again".
32+
logger.Debug(fmt.Sprintf("email %s not found", email))
2933
return nil
3034
}
3135

0 commit comments

Comments
 (0)