fix: api test

This commit is contained in:
jialin
2026-05-11 19:49:21 +08:00
committed by jialin
parent fc900c8ce6
commit 4128de61f9
29 changed files with 687 additions and 380 deletions
@@ -3,10 +3,7 @@ import { FormData, ListItem } from '../types';
export const GPU_SERVICE_PUBLIC_KEY_API = '/gpu-instance-ssh-public-keys/data';
export async function queryGPUServicePublicKeys(
params: Global.SearchParams,
options?: any
) {
export async function queryGPUServicePublicKeys(params: {}, options?: any) {
return request<ListItem>(GPU_SERVICE_PUBLIC_KEY_API, {
method: 'GET',
params,
+2 -2
View File
@@ -16,7 +16,7 @@ const GPUServicePublicKeys: React.FC = () => {
const { fetchData: updateSshkey, loading: updating } = useUpdateSshkey();
useEffect(() => {
fetchSshkey({ page: 1, perPage: 100 }).then((res) => {
fetchSshkey({}).then((res) => {
const data = res?.spec?.data || '';
form.setFieldsValue({
name: res?.name,
@@ -76,7 +76,7 @@ const GPUServicePublicKeys: React.FC = () => {
trim={false}
alwaysFocus
autoSize={{ minRows: 8, maxRows: 16 }}
style={{ width: INPUT_WIDTH.large }}
style={{ width: INPUT_WIDTH.large, minHeight: 186 }}
/>
</Form.Item>
<Button
@@ -5,8 +5,7 @@ import { ListItem } from '../types';
export default function useGetSshkey() {
const fetchDetail = useCallback(
(params: Global.SearchParams = { page: 1, perPage: 100 }, options?: any) =>
queryGPUServicePublicKeys(params, options),
(params: {}, options?: any) => queryGPUServicePublicKeys(params, options),
[]
);