mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 16:57:51 +08:00
functions/helpers: Add DB tests.
Signed-off-by: John Sahhar <john@gravitl.com>
This commit is contained in:
@@ -71,16 +71,3 @@ func GetAllExtClients() ([]models.ExtClient, error) {
|
||||
|
||||
return extclients, nil
|
||||
}
|
||||
|
||||
// DeleteKey - deletes a key
|
||||
func DeleteKey(network models.Network, i int) {
|
||||
|
||||
network.AccessKeys = append(network.AccessKeys[:i],
|
||||
network.AccessKeys[i+1:]...)
|
||||
|
||||
if networkData, err := json.Marshal(&network); err != nil {
|
||||
return
|
||||
} else {
|
||||
database.Insert(network.NetID, string(networkData), database.NETWORKS_TABLE_NAME)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user