mirror of
https://github.com/juanfont/headscale.git
synced 2025-10-17 22:02:11 +00:00
Remove dependency on postgres' jsonb
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"errors"
|
||||
"log"
|
||||
|
||||
"github.com/jinzhu/gorm/dialects/postgres"
|
||||
"gorm.io/datatypes"
|
||||
"inet.af/netaddr"
|
||||
)
|
||||
|
||||
@@ -49,7 +49,7 @@ func (h *Headscale) EnableNodeRoute(namespace string, nodeName string, routeStr
|
||||
}
|
||||
|
||||
routes, _ := json.Marshal([]string{routeStr}) // TODO: only one for the time being, so overwriting the rest
|
||||
m.EnabledRoutes = postgres.Jsonb{RawMessage: json.RawMessage(routes)}
|
||||
m.EnabledRoutes = datatypes.JSON(routes)
|
||||
db.Save(&m)
|
||||
db.Close()
|
||||
|
||||
|
Reference in New Issue
Block a user