diff --git a/classlib/class/nameserver.cs b/classlib/class/nameserver.cs index 77962b5..18bd6e5 100644 --- a/classlib/class/nameserver.cs +++ b/classlib/class/nameserver.cs @@ -5,7 +5,8 @@ using System; public class Nameserver { public int Id { get; } public string Name { get; } - public string[] NameSevers { get; } + public string[] NameServers { get; } + public string Description { get; } public string Permissions { get; } public DateTime? EditDate { get; } @@ -13,12 +14,14 @@ public class Nameserver { int id, string name, string nameServers, + string description, string permissions, DateTime? editDate ) { this.Id = id; this.Name = name; - this.NameSevers = nameServers.Split(';'); + this.NameServers = nameServers.Split(new char[] {';'}); + this.Description = description; this.Permissions = permissions; this.EditDate = editDate; } diff --git a/functions/private/Invoke-Request.ps1 b/functions/private/Invoke-Request.ps1 index 3dc3d3c..7925d41 100644 --- a/functions/private/Invoke-Request.ps1 +++ b/functions/private/Invoke-Request.ps1 @@ -27,7 +27,7 @@ function Invoke-Request { if ($_tokenStatus -eq "Expired") { Update-Session } $_uri = "$($script:psipamSession.URL)/api/$($script:psipamSession.AppID)/$Controller" - if ($SubController -ne $null) { $SubController;$_uri += "/$SubController" } + if ($SubController -ne $null) { $_uri += "/$SubController" } if ($Identifiers -ne $null) { $_uri += "/$($Identifiers -join '/')/" } $_headers = @{ diff --git a/functions/public/Get-Nameserver.ps1 b/functions/public/Get-Nameserver.ps1 index 34b4515..dae4bac 100644 --- a/functions/public/Get-Nameserver.ps1 +++ b/functions/public/Get-Nameserver.ps1 @@ -17,6 +17,7 @@ function Get-Nameserver { Controller = [PS.IPAM.controllers]::tools SubController = [PS.IPAM.subcontrollers]::nameservers Method = "GET" + Type = [PS.IPAM.types]::nameserver } switch ($PSCmdlet.ParameterSetName) { "ByID" { $_nameserverId = $Id; break } diff --git a/ps.ipam.psd1 b/ps.ipam.psd1 index d188139..077e9bf 100644 --- a/ps.ipam.psd1 +++ b/ps.ipam.psd1 @@ -7,7 +7,7 @@ @{ RootModule = 'ps.ipam.psm1' - ModuleVersion = '' + ModuleVersion = '2.0' GUID = 'cd573493-4245-4073-a238-fab2251d78d0' Author = 'Nikolay Tatarinov' Copyright = '(c) 2022 Nikolay Tatarinov. All rights reserved.' @@ -51,7 +51,7 @@ Tags = @('phpIPAM') LicenseUri = 'https://git.arnike.ru/Arnike/ps.ipam/src/branch/main/LICENSE' ProjectUri = 'https://git.arnike.ru/Arnike/ps.ipam' - IconUri = 'https://git.arnike.ru/Arnike/ps.ipam/src/branch/main/images/logo.png' + IconUri = 'https://git.arnike.ru/Arnike/ps.ipam/src/branch/main/images/logo.png' # ReleaseNotes of this module # ReleaseNotes = '' diff --git a/types/types.ps1xml b/types/types.ps1xml index 7acac0f..b590d09 100644 --- a/types/types.ps1xml +++ b/types/types.ps1xml @@ -170,4 +170,29 @@ + + ps.ipam.nameserver + + + PSStandardMembers + + + DefaultDisplayPropertySet + + Id + Name + NameServers + Description + + + + DefaultKeyPropertySet + + Id + + + + + + \ No newline at end of file