fixed return and logs

This commit is contained in:
0xdcarns
2021-12-07 11:15:01 -05:00
parent 95528f510a
commit 6184d0b965
3 changed files with 6 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ import (
* If being deleted by server, create a record in the DELETED_NODES_TABLE for the client to find
* If being deleted by the client, delete completely
*/
// DeleteNode - deletes a node
func DeleteNode(key string, exterminate bool) error {
var err error
if !exterminate {
@@ -46,6 +47,7 @@ func DeleteNode(key string, exterminate bool) error {
return err
}
// DeleteIntClient - deletes an int client
func DeleteIntClient(clientid string) (bool, error) {
err := database.DeleteRecord(database.INT_CLIENTS_TABLE_NAME, clientid)
@@ -56,6 +58,7 @@ func DeleteIntClient(clientid string) (bool, error) {
return true, nil
}
// GetNode - gets a node
func GetNode(macaddress string, network string) (models.Node, error) {
var node models.Node
@@ -80,6 +83,7 @@ func GetNode(macaddress string, network string) (models.Node, error) {
return node, err
}
// GetIntClient - gets int client
func GetIntClient(clientid string) (models.IntClient, error) {
var client models.IntClient