mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-25 01:07:52 +00:00
Update sharing.go
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no>
This commit is contained in:
parent
b098d84557
commit
4b4a5a4b93
@ -20,7 +20,7 @@ func (h *Headscale) AddSharedMachineToNamespace(m *Machine, ns *Namespace) error
|
|||||||
return errorSameNamespace
|
return errorSameNamespace
|
||||||
}
|
}
|
||||||
|
|
||||||
sn := SharedMachine{}
|
sharedMachine := SharedMachine{}
|
||||||
if err := h.db.Where("machine_id = ? AND namespace_id", m.ID, ns.ID).First(&sharedMachine).Error; err == nil {
|
if err := h.db.Where("machine_id = ? AND namespace_id", m.ID, ns.ID).First(&sharedMachine).Error; err == nil {
|
||||||
return errorMachineAlreadyShared
|
return errorMachineAlreadyShared
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user