Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[server] Rename accountUrl -> accountsUrl

Neeraj Gupta42a8b5c826eb
diff --git a/server/ente/user.go b/server/ente/user.go
index 554f7fdcab..9ab12f31a4 100644
--- a/server/ente/user.go
+++ b/server/ente/user.go
@@ -54,8 +54,8 @@ type EmailAuthorizationResponse struct {
EncryptedToken string `json:"encryptedToken,omitempty"`
Token string `json:"token,omitempty"`
PasskeySessionID string `json:"passkeySessionID"`
- // AccountUrl is the url used for passkey validation
- AccountUrl string `json:"accountUrl"`
+ // AccountsUrl is the url used for passkey validation
+ AccountsUrl string `json:"accountsUrl"`
TwoFactorSessionID string `json:"twoFactorSessionID"`
// TwoFactorSessionIDV2 is set only if user has both passkey and two factor enabled.
// This is to ensure older clients keep using passkey flow when both are set. We can remove
diff --git a/server/pkg/controller/user/userauth.go b/server/pkg/controller/user/userauth.go
index bccc15d396..6721903518 100644
--- a/server/pkg/controller/user/userauth.go
+++ b/server/pkg/controller/user/userauth.go
@@ -405,11 +405,11 @@ func (c *UserController) onVerificationSuccess(context *gin.Context, email strin
return ente.EmailAuthorizationResponse{}, stacktrace.Propagate(err, "")
}
}
- accountUrl := viper.GetString("apps.accounts")
+ accountsUrl := viper.GetString("apps.accounts")
if hasPasskeys && isTwoFactorEnabled {
- return ente.EmailAuthorizationResponse{ID: userID, PasskeySessionID: passKeySessionID, AccountUrl: accountUrl, TwoFactorSessionIDV2: twoFactorSessionID}, nil
+ return ente.EmailAuthorizationResponse{ID: userID, PasskeySessionID: passKeySessionID, AccountsUrl: accountsUrl, TwoFactorSessionIDV2: twoFactorSessionID}, nil
} else if hasPasskeys {
- return ente.EmailAuthorizationResponse{ID: userID, PasskeySessionID: passKeySessionID, AccountUrl: accountUrl}, nil
+ return ente.EmailAuthorizationResponse{ID: userID, PasskeySessionID: passKeySessionID, AccountsUrl: accountsUrl}, nil
} else if isTwoFactorEnabled {
return ente.EmailAuthorizationResponse{ID: userID, TwoFactorSessionID: twoFactorSessionID}, nil
}