Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

chore: Fixed the typo in ProfilePirctureURL attr (#3307)

Chandan Jhunjhunwal03220fcf1161
diff --git a/pkg/query-service/app/http_handler.go b/pkg/query-service/app/http_handler.go
index 885058f419..5267ac49d3 100644
--- a/pkg/query-service/app/http_handler.go
+++ b/pkg/query-service/app/http_handler.go
@@ -1935,18 +1935,18 @@ func (aH *APIHandler) editUser(w http.ResponseWriter, r *http.Request) {
if len(update.Name) > 0 {
old.Name = update.Name
}
- if len(update.ProfilePirctureURL) > 0 {
- old.ProfilePirctureURL = update.ProfilePirctureURL
+ if len(update.ProfilePictureURL) > 0 {
+ old.ProfilePictureURL = update.ProfilePictureURL
}
_, apiErr = dao.DB().EditUser(ctx, &model.User{
- Id: old.Id,
- Name: old.Name,
- OrgId: old.OrgId,
- Email: old.Email,
- Password: old.Password,
- CreatedAt: old.CreatedAt,
- ProfilePirctureURL: old.ProfilePirctureURL,
+ Id: old.Id,
+ Name: old.Name,
+ OrgId: old.OrgId,
+ Email: old.Email,
+ Password: old.Password,
+ CreatedAt: old.CreatedAt,
+ ProfilePictureURL: old.ProfilePictureURL,
})
if apiErr != nil {
RespondError(w, apiErr, nil)
diff --git a/pkg/query-service/auth/auth.go b/pkg/query-service/auth/auth.go
index b7fc34e1ed..d2488a1399 100644
--- a/pkg/query-service/auth/auth.go
+++ b/pkg/query-service/auth/auth.go
@@ -250,14 +250,14 @@ func RegisterFirstUser(ctx context.Context, req *RegisterRequest) (*model.User,
}
user := &model.User{
- Id: uuid.NewString(),
- Name: req.Name,
- Email: req.Email,
- Password: hash,
- CreatedAt: time.Now().Unix(),
- ProfilePirctureURL: "", // Currently unused
- GroupId: group.Id,
- OrgId: org.Id,
+ Id: uuid.NewString(),
+ Name: req.Name,
+ Email: req.Email,
+ Password: hash,
+ CreatedAt: time.Now().Unix(),
+ ProfilePictureURL: "", // Currently unused
+ GroupId: group.Id,
+ OrgId: org.Id,
}
return dao.DB().CreateUser(ctx, user, true)
@@ -328,14 +328,14 @@ func RegisterInvitedUser(ctx context.Context, req *RegisterRequest, nopassword b
}
user := &model.User{
- Id: uuid.NewString(),
- Name: req.Name,
- Email: req.Email,
- Password: hash,
- CreatedAt: time.Now().Unix(),
- ProfilePirctureURL: "", // Currently unused
- GroupId: group.Id,
- OrgId: invite.OrgId,
+ Id: uuid.NewString(),
+ Name: req.Name,
+ Email: req.Email,
+ Password: hash,
+ CreatedAt: time.Now().Unix(),
+ ProfilePictureURL: "", // Currently unused
+ GroupId: group.Id,
+ OrgId: invite.OrgId,
}
// TODO(Ahsan): Ideally create user and delete invitation should happen in a txn.
diff --git a/pkg/query-service/dao/sqlite/rbac.go b/pkg/query-service/dao/sqlite/rbac.go
index 64ff7ed8ae..bc39904ee6 100644
--- a/pkg/query-service/dao/sqlite/rbac.go
+++ b/pkg/query-service/dao/sqlite/rbac.go
@@ -185,7 +185,7 @@ func (mds *ModelDaoSqlite) CreateUser(ctx context.Context,
`INSERT INTO users (id, name, email, password, created_at, profile_picture_url, group_id, org_id)
VALUES (?, ?, ?, ?, ?, ?, ?,?);`,
user.Id, user.Name, user.Email, user.Password, user.CreatedAt,
- user.ProfilePirctureURL, user.GroupId, user.OrgId,
+ user.ProfilePictureURL, user.GroupId, user.OrgId,
)
if err != nil {
@@ -275,13 +275,13 @@ func (mds *ModelDaoSqlite) GetUser(ctx context.Context,
u.group_id,
g.name as role,
o.name as organization,
- COALESCE((select uf.flags
- from user_flags uf
+ COALESCE((select uf.flags
+ from user_flags uf
where u.id = uf.user_id), '') as flags
from users u, groups g, organizations o
where
g.id=u.group_id and
- o.id = u.org_id and
+ o.id = u.org_id and
u.id=?;`
if err := mds.db.Select(&users, query, id); err != nil {
diff --git a/pkg/query-service/model/db.go b/pkg/query-service/model/db.go
index 9ae7270232..9dcefd7ee0 100644
--- a/pkg/query-service/model/db.go
+++ b/pkg/query-service/model/db.go
@@ -26,14 +26,14 @@ type InvitationObject struct {
}
type User struct {
- Id string `json:"id" db:"id"`
- Name string `json:"name" db:"name"`
- Email string `json:"email" db:"email"`
- Password string `json:"password,omitempty" db:"password"`
- CreatedAt int64 `json:"createdAt" db:"created_at"`
- ProfilePirctureURL string `json:"profilePictureURL" db:"profile_picture_url"`
- OrgId string `json:"orgId,omitempty" db:"org_id"`
- GroupId string `json:"groupId,omitempty" db:"group_id"`
+ Id string `json:"id" db:"id"`
+ Name string `json:"name" db:"name"`
+ Email string `json:"email" db:"email"`
+ Password string `json:"password,omitempty" db:"password"`
+ CreatedAt int64 `json:"createdAt" db:"created_at"`
+ ProfilePictureURL string `json:"profilePictureURL" db:"profile_picture_url"`
+ OrgId string `json:"orgId,omitempty" db:"org_id"`
+ GroupId string `json:"groupId,omitempty" db:"group_id"`
}
type ApdexSettings struct {