()
| 111 | * POST /api/projects |
| 112 | */ |
| 113 | export function useCreateProject() { |
| 114 | const queryClient = useQueryClient() |
| 115 | |
| 116 | return useMutation({ |
| 117 | mutationFn: (input: CreateProjectInput) => |
| 118 | apiClient.post<Project>('/projects', input), |
| 119 | onSuccess: () => { |
| 120 | queryClient.invalidateQueries({ queryKey: queryKeys.projects.all }) |
| 121 | }, |
| 122 | }) |
| 123 | } |
| 124 | |
| 125 | /** |
| 126 | * 更新项目 |
no test coverage detected