chore: fix ci problem

This commit is contained in:
moonrailgun 2024-08-16 01:19:13 +08:00
parent 49d0da3a6d
commit 3e3dc4c22d
3 changed files with 8 additions and 5 deletions

View File

@ -26,9 +26,8 @@ function PageComponent() {
const onSubmit = useEvent(async (values: SurveyEditFormValues) => {
const res = await createMutation.mutateAsync({
...values,
workspaceId,
name: values.name,
payload: values.payload,
});
utils.survey.all.refetch();

View File

@ -17,8 +17,6 @@ describe('survey', () => {
},
],
},
createdAt: '',
updatedAt: '',
})
).matchSnapshot();
});

View File

@ -5,7 +5,13 @@ import { AppRouterOutput } from '@/api/trpc';
*/
export function generateSurveyExampleCode(
host: string,
info?: AppRouterOutput['survey']['get']
info:
| Pick<
NonNullable<AppRouterOutput['survey']['get']>,
'id' | 'name' | 'workspaceId' | 'payload'
>
| null
| undefined
): string {
const fields = info?.payload.items ?? [];