fix: api test
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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),
|
||||
[]
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user