feat(flows): add flow filters
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
import api from 'helpers/api';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
|
||||
export default function useFlows({ flowName, page, folderId }) {
|
||||
export default function useFlows({
|
||||
flowName,
|
||||
page,
|
||||
folderId,
|
||||
status,
|
||||
onlyOwnedFlows,
|
||||
}) {
|
||||
const query = useQuery({
|
||||
queryKey: ['flows', flowName, { page, folderId }],
|
||||
queryKey: ['flows', { flowName, page, folderId, status, onlyOwnedFlows }],
|
||||
queryFn: async ({ signal }) => {
|
||||
const { data } = await api.get('/v1/flows', {
|
||||
params: { name: flowName, page, folderId },
|
||||
params: { name: flowName, page, folderId, status, onlyOwnedFlows },
|
||||
signal,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user