feat: update users save password
This commit is contained in:
parent
78e7c3f026
commit
3f4aa1baaa
|
|
@ -23,6 +23,7 @@ type Users struct {
|
||||||
StatusId *int `json:"status_id" gorm:"type:int4;default:1"`
|
StatusId *int `json:"status_id" gorm:"type:int4;default:1"`
|
||||||
CreatedById *uint `json:"created_by_id" gorm:"type:int4"`
|
CreatedById *uint `json:"created_by_id" gorm:"type:int4"`
|
||||||
ProfilePicturePath *string `json:"profile_picture_path" gorm:"type:varchar"`
|
ProfilePicturePath *string `json:"profile_picture_path" gorm:"type:varchar"`
|
||||||
|
TempPassword *string `json:"temp_password" gorm:"type:varchar"`
|
||||||
IsActive *bool `json:"is_active" gorm:"type:bool;default:true"`
|
IsActive *bool `json:"is_active" gorm:"type:bool;default:true"`
|
||||||
CreatedAt time.Time `json:"created_at" gorm:"default:now()"`
|
CreatedAt time.Time `json:"created_at" gorm:"default:now()"`
|
||||||
UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"`
|
UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"`
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@ func (_i *usersService) Save(req request.UsersCreateRequest, authToken string) (
|
||||||
}
|
}
|
||||||
|
|
||||||
newReq.KeycloakId = &keycloakId
|
newReq.KeycloakId = &keycloakId
|
||||||
|
newReq.TempPassword = &req.Password
|
||||||
|
|
||||||
return _i.Repo.Create(newReq)
|
return _i.Repo.Create(newReq)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue