Return user info in the peer APi response

This commit is contained in:
braginini
2022-09-23 18:24:31 +02:00
parent 2ee7d69f80
commit 6bee984b46
3 changed files with 27 additions and 1 deletions

View File

@@ -110,6 +110,15 @@ components:
ssh_enabled:
description: Indicates whether SSH server is enabled on this peer
type: boolean
user_email:
description: User Email that this peer was added by
type: string
user_name:
description: User full name that this peer was added by
type: string
host_name:
description: Peer's hostname
type: string
required:
- ip
- connected

View File

@@ -137,6 +137,9 @@ type Peer struct {
// Groups that the peer belongs to
Groups []GroupMinimum `json:"groups"`
// Peer's hostname
HostName *string `json:"host_name,omitempty"`
// Peer ID
Id string `json:"id"`
@@ -155,6 +158,12 @@ type Peer struct {
// Indicates whether SSH server is enabled on this peer
SshEnabled bool `json:"ssh_enabled"`
// User Email that this peer was added by
UserEmail *string `json:"user_email,omitempty"`
// User full name that this peer was added by
UserName *string `json:"user_name,omitempty"`
// Peer's daemon or cli version
Version string `json:"version"`
}