fix(core): update
This commit is contained in:
parent
aba8182422
commit
a898928bd3
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@apiclient.xyz/hetznercloud',
|
name: '@apiclient.xyz/hetznercloud',
|
||||||
version: '1.0.13',
|
version: '1.0.14',
|
||||||
description: 'an unofficial api client for the hetzner cloud api'
|
description: 'an unofficial api client for the hetzner cloud api'
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ export class HetznerServer {
|
|||||||
public static async getServerByLabel(hetznerAccountRefArg: HetznerAccount, labelArg: string, valueArg?: string) {
|
public static async getServerByLabel(hetznerAccountRefArg: HetznerAccount, labelArg: string, valueArg?: string) {
|
||||||
const servers = await HetznerServer.getServers(hetznerAccountRefArg);
|
const servers = await HetznerServer.getServers(hetznerAccountRefArg);
|
||||||
for (const server of servers) {
|
for (const server of servers) {
|
||||||
if (server.data.labels[labelArg] === valueArg) {
|
if (valueArg ? server.data.labels[labelArg] === valueArg : server.data.labels[labelArg]) {
|
||||||
return server;
|
return server;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user