change user db structure for workspaces
This commit is contained in:
@@ -122,11 +122,12 @@ func (aH *AccessHandler) Login(c *gin.Context) {
|
||||
aH.logger.Info("Login", "user "+user.Name+" logged in successfully")
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"message": "login successful",
|
||||
"id": user.Id,
|
||||
"user": user.Name,
|
||||
"role": user.Role.Role,
|
||||
"settings": user.Settings,
|
||||
"message": "login successful",
|
||||
"id": user.Id,
|
||||
"user": user.Name,
|
||||
"role": user.Role.Role,
|
||||
"settings": user.Settings,
|
||||
"workspace": user.WorkspaceID,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -223,9 +224,10 @@ func (aH *AccessHandler) Me(c *gin.Context) {
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"id": claims["id"],
|
||||
"user": claims["username"],
|
||||
"role": claims["role"],
|
||||
"id": claims["id"],
|
||||
"user": claims["username"],
|
||||
"role": claims["role"],
|
||||
"workspace": claims["workspace"],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user