Expose network system state table to api
This commit is contained in:
@@ -5,6 +5,8 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/safing/portmaster/network/state"
|
||||
|
||||
"github.com/safing/portbase/database"
|
||||
"github.com/safing/portbase/database/iterator"
|
||||
"github.com/safing/portbase/database/query"
|
||||
@@ -57,13 +59,13 @@ func (s *StorageInterface) Get(key string) (record.Record, error) {
|
||||
return conn, nil
|
||||
}
|
||||
}
|
||||
// case "system":
|
||||
// if len(splitted) >= 2 {
|
||||
// switch splitted[1] {
|
||||
// case "":
|
||||
// process.Get
|
||||
// }
|
||||
// }
|
||||
case "system":
|
||||
if len(splitted) >= 2 {
|
||||
switch splitted[1] {
|
||||
case "state":
|
||||
return state.GetStateInfo(), nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil, storage.ErrNotFound
|
||||
|
||||
Reference in New Issue
Block a user