MCPcopy Create free account
hub / github.com/agent-tower/core / useUpdateProject

Function useUpdateProject

packages/web/src/hooks/use-projects.ts:129–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127 * PUT /api/projects/:id
128 */
129export function useUpdateProject() {
130 const queryClient = useQueryClient()
131
132 return useMutation({
133 mutationFn: ({ id, ...data }: UpdateProjectInput) =>
134 apiClient.put<Project>(`/projects/${id}`, data),
135 onSuccess: (_data, variables) => {
136 queryClient.invalidateQueries({ queryKey: queryKeys.projects.all })
137 queryClient.invalidateQueries({
138 queryKey: queryKeys.projects.detail(variables.id),
139 })
140 },
141 })
142}
143
144/**
145 * 删除项目

Callers 1

ProjectSettingsPageFunction · 0.90

Calls 1

putMethod · 0.80

Tested by

no test coverage detected