1
0
Fork 0
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:
Prabhat Khera 2023-05-12 14:27:15 +12:00
parent 6ab6ffa68e
commit 479842d5ef

View file

@ -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
}