mirror of
https://github.com/portainer/portainer.git
synced 2025-08-09 07:45:22 +02:00
ssl dataservice fixed
This commit is contained in:
parent
5ce938123d
commit
cf5bec7f2d
2 changed files with 6 additions and 7 deletions
|
@ -18,14 +18,13 @@ func NewService(connection portainer.Connection) (*Service, error) {
|
|||
|
||||
// Settings retrieve the ssl settings object.
|
||||
func (service *Service) Settings() (*portainer.SSLSettings, error) {
|
||||
var settings portainer.SSLSettings
|
||||
db := service.connection.GetDB()
|
||||
tx := db.Take(&settings)
|
||||
if tx.Error != nil {
|
||||
return nil, tx.Error
|
||||
var obj portainer.SSLSettings
|
||||
err := service.connection.GetByID(1, &obj)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &settings, nil
|
||||
return &obj, nil
|
||||
}
|
||||
|
||||
// UpdateSettings persists a SSLSettings object.
|
||||
|
|
|
@ -18,7 +18,7 @@ func NewService(connection portainer.Connection) (*Service, error) {
|
|||
|
||||
// User returns a user by ID
|
||||
func (service *Service) User(ID portainer.UserID) (*portainer.User, error) {
|
||||
obj := portainer.User{}
|
||||
var obj portainer.User
|
||||
|
||||
err := service.connection.GetByID(int(ID), &obj)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue