Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(backend): replace email with new user login log #1719

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions backend/api/measure/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ func extractToken(c *gin.Context) (token string) {
return
}

// logEmail logs email to std out
func logEmail(email string) {
fmt.Println("Logged in user email: ", email)
// logNewUserFirstLogin logs new user's first login to stdout
func logNewUserFirstLogin() {
fmt.Println("New user logged in")
}

// ValidateAPIKey validates the Measure API key.
Expand Down Expand Up @@ -325,7 +325,7 @@ func SigninGitHub(c *gin.Context) {
}

// Once new user creation is done, track email
logEmail(ghUser.Email)
logNewUserFirstLogin()
} else {
// update user's last sign in at value
if err := msrUser.touchLastSignInAt(ctx); err != nil {
Expand Down Expand Up @@ -530,7 +530,7 @@ func SigninGoogle(c *gin.Context) {
}

// Once new user creation is done, track email
logEmail(googUser.Email)
logNewUserFirstLogin()
} else {
// update user's last sign in at value
if err := msrUser.touchLastSignInAt(ctx); err != nil {
Expand Down
Loading