This commit is contained in:
Adam Ierymenko 2019-09-25 14:31:08 -07:00
parent 570032484f
commit 5175636d36
No known key found for this signature in database
GPG Key ID: C8877CF2D7A5D7F3
2 changed files with 8 additions and 4 deletions

View File

@ -109,7 +109,7 @@ func main() {
case "status":
authTokenRequired(authToken)
cli.Status(basePath, authToken, cmdArgs, *jflag)
case "peers":
case "peers", "listpeers":
authTokenRequired(authToken)
cli.Peers(basePath, authToken, cmdArgs)
case "roots":
@ -121,7 +121,7 @@ func main() {
case "removeroot":
authTokenRequired(authToken)
cli.RemoveRoot(basePath, authToken, cmdArgs)
case "networks":
case "networks", "listnetworks":
authTokenRequired(authToken)
cli.Networks(basePath, authToken, cmdArgs)
case "join":

View File

@ -126,7 +126,7 @@ func (id *Identity) String() string {
switch id.idtype {
case IdentityTypeC25519:
if len(id.publicKey) == IdentityTypeC25519PublicKeySize {
return fmt.Sprintf("%.10x:0:%x", id.address, id.publicKey)
return fmt.Sprintf("%.10x:0:%x", uint64(id.address), id.publicKey)
}
case IdentityTypeP384:
if len(id.publicKey) == IdentityTypeP384PublicKeySize {
@ -148,7 +148,11 @@ func (id *Identity) UnmarshalJSON(j []byte) error {
if err != nil {
return err
}
fmt.Println(s)
nid, err := NewIdentityFromString(s)
if err != nil {
return err
}
*id = *nid
return err
return nil
}