mirror of
https://github.com/tale/headplane.git
synced 2026-08-21 18:26:38 +00:00
Add key expiry disable/enable toggle (#554)
This commit is contained in:
@@ -19,6 +19,7 @@ export interface NodeApi {
|
||||
expire(id: string): Promise<void>;
|
||||
rename(id: string, newName: string): Promise<void>;
|
||||
setTags(id: string, tags: string[]): Promise<void>;
|
||||
toggleExpiry(nodeId: string, disableExpiry: boolean): Promise<void>;
|
||||
/**
|
||||
* Reassign a node to a different user. Only present when
|
||||
* `capabilities.nodeOwnerIsImmutable` is false (Headscale < 0.28).
|
||||
@@ -104,6 +105,13 @@ export function makeNodeApi(
|
||||
body: { tags },
|
||||
});
|
||||
},
|
||||
toggleExpiry: async (nodeId, disableExpiry) => {
|
||||
await transport.request({
|
||||
method: "POST",
|
||||
path: `v1/node/${nodeId}/expire?disableExpiry=${disableExpiry}`,
|
||||
apiKey,
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
if (!capabilities.nodeOwnerIsImmutable) {
|
||||
|
||||
Reference in New Issue
Block a user