mirror of
https://github.com/portainer/portainer.git
synced 2025-08-09 15:55:23 +02:00
fix create endpoint
This commit is contained in:
parent
6ab6ffa68e
commit
479842d5ef
1 changed files with 5 additions and 0 deletions
|
@ -132,5 +132,10 @@ func (service *Service) UpdateHeartbeat(endpointID portainer.EndpointID) {
|
|||
|
||||
// CreateEndpoint assign an ID to a new environment(endpoint) and saves it.
|
||||
func (service *Service) Create(endpoint *portainer.Endpoint) error {
|
||||
db := service.connection.GetDB()
|
||||
tx := db.Model(&portainer.Endpoint{}).Create(&endpoint)
|
||||
if tx.Error != nil {
|
||||
return tx.Error
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue