Skip to content

armgit / ente

Public Imported from GitHub
0

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

[server] Return key attributes in the session-validity response

Manav Rathi06e7626206ad
diff --git a/server/pkg/api/user.go b/server/pkg/api/user.go
index 71e050fdeb..223ebb30da 100644
--- a/server/pkg/api/user.go
+++ b/server/pkg/api/user.go
@@ -185,10 +185,11 @@ func (h *UserHandler) GetRoadmapURLV2(c *gin.Context) {
// GetSessionValidityV2 verifies the user's session token and returns if the user has set their keys or not
func (h *UserHandler) GetSessionValidityV2(c *gin.Context) {
userID := auth.GetUserID(c.Request.Header)
- _, err := h.UserController.GetAttributes(userID)
+ keyAttributes, err := h.UserController.GetAttributes(userID)
if err == nil {
c.JSON(http.StatusOK, gin.H{
"hasSetKeys": true,
+ "keyAttributes": keyAttributes,
})
} else {
if errors.Is(err, sql.ErrNoRows) {