mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-18 07:23:51 +01:00
Proto selection UI/models
This commit is contained in:
@@ -3,8 +3,10 @@ import type { GrpcRequest } from '../lib/models';
|
||||
import { useUpdateAnyGrpcRequest } from './useUpdateAnyGrpcRequest';
|
||||
|
||||
export function useUpdateGrpcRequest(id: string | null) {
|
||||
const updateAnyRequest = useUpdateAnyGrpcRequest();
|
||||
const updateAnyGrpcRequest = useUpdateAnyGrpcRequest();
|
||||
return useMutation<void, unknown, Partial<GrpcRequest> | ((r: GrpcRequest) => GrpcRequest)>({
|
||||
mutationFn: async (update) => updateAnyRequest.mutateAsync({ id: id ?? 'n/a', update }),
|
||||
mutationFn: async (update) => {
|
||||
return updateAnyGrpcRequest.mutateAsync({ id: id ?? 'n/a', update });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user