fix: ssh_key_id
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-02-25 15:15:20 +00:00
parent fd1df3ce3d
commit 5af12b4f07
2 changed files with 3 additions and 3 deletions

View File

@ -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),
);

View File

@ -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 () {