This commit is contained in:
@ -94,7 +94,7 @@ export interface VmPayment {
|
||||
is_paid: boolean;
|
||||
}
|
||||
|
||||
export interface PathVm {
|
||||
export interface PatchVm {
|
||||
ssh_key_id?: number;
|
||||
}
|
||||
|
||||
@ -132,7 +132,7 @@ export class LNVpsApi {
|
||||
return data;
|
||||
}
|
||||
|
||||
async patchVm(id: number, req: PathVm) {
|
||||
async patchVm(id: number, req: PatchVm) {
|
||||
const { data } = await this.#handleResponse<ApiResponse<void>>(
|
||||
await this.#req(`/api/v1/vm/${id}`, "PATCH", req),
|
||||
);
|
||||
|
@ -26,7 +26,7 @@ export default function VmPage() {
|
||||
const [term] = useState<Terminal>();
|
||||
const termRef = useRef<HTMLDivElement | null>(null);
|
||||
const [editKey, setEditKey] = useState(false);
|
||||
const [key, setKey] = useState(state?.ssh_key_id ?? -1);
|
||||
const [key, setKey] = useState(state?.ssh_key.id ?? -1);
|
||||
|
||||
const renew = useCallback(
|
||||
async function () {
|
||||
|
Reference in New Issue
Block a user