mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-31 07:22:02 +08:00
chore: Fixed the typo in ProfilePirctureURL attr (#3307)
This commit is contained in:
parent
233589b867
commit
03220fcf11
@ -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)
|
||||
|
@ -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.
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user