Skip to content

Commit b4b6388

Browse files
committed
Go back to using legacy API for schedule count
1 parent 006bec8 commit b4b6388

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

src/lib/services/workflow-counts.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,18 @@ export const fetchScheduleCount = async ({
9898
namespace: string;
9999
query?: string;
100100
}): Promise<string> => {
101-
try {
102-
const countRoute = routeForApi('schedules.count', { namespace });
103-
const { count } = await requestFromAPI<CountSchedulesResponse>(countRoute, {
104-
params: query ? { query } : {},
105-
notifyOnError: false,
106-
});
107-
return count ?? '0';
108-
} catch (error: unknown) {
109-
if (isNotImplemented(error) || isNotFound(error)) {
110-
return fetchScheduleCountLegacy(namespace, query);
111-
}
112-
throw error;
113-
}
101+
return fetchScheduleCountLegacy(namespace, query);
102+
// try {
103+
// const countRoute = routeForApi('schedules.count', { namespace });
104+
// const { count } = await requestFromAPI<CountSchedulesResponse>(countRoute, {
105+
// params: query ? { query } : {},
106+
// notifyOnError: false,
107+
// });
108+
// return count ?? '0';
109+
// } catch (error: unknown) {
110+
// if (isNotImplemented(error) || isNotFound(error)) {
111+
// return fetchScheduleCountLegacy(namespace, query);
112+
// }
113+
// throw error;
114+
// }
114115
};

0 commit comments

Comments
 (0)