mirror of
https://github.com/InazumaV/Ratte.git
synced 2026-02-04 04:30:09 +00:00
fix OtherOptions not merge
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"github.com/InazumaV/Ratte-Interface/core"
|
"github.com/InazumaV/Ratte-Interface/core"
|
||||||
"github.com/InazumaV/Ratte-Interface/panel"
|
"github.com/InazumaV/Ratte-Interface/panel"
|
||||||
|
"github.com/InazumaV/Ratte/common/maps"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (h *Handler) PullNodeHandle(n *panel.NodeInfo) error {
|
func (h *Handler) PullNodeHandle(n *panel.NodeInfo) error {
|
||||||
@@ -40,8 +41,10 @@ func (h *Handler) PullNodeHandle(n *panel.NodeInfo) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
h.l.WithError(err).Error("Exec before add node hook failed")
|
h.l.WithError(err).Error("Exec before add node hook failed")
|
||||||
}
|
}
|
||||||
|
ni := (*core.NodeInfo)(n)
|
||||||
|
ni.OtherOptions = maps.Merge[string, any](ni.OtherOptions, h.Options.Expand)
|
||||||
err = h.c.AddNode(&core.AddNodeParams{
|
err = h.c.AddNode(&core.AddNodeParams{
|
||||||
NodeInfo: (*core.NodeInfo)(n),
|
NodeInfo: ni,
|
||||||
TlsOptions: core.TlsOptions{
|
TlsOptions: core.TlsOptions{
|
||||||
CertPath: h.Cert.CertPath,
|
CertPath: h.Cert.CertPath,
|
||||||
KeyPath: h.Cert.KeyPath,
|
KeyPath: h.Cert.KeyPath,
|
||||||
|
|||||||
Reference in New Issue
Block a user