mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-31 01:16:01 +02:00
Change fetcher in OSS chang (#2518)
This commit is contained in:
parent
6e2351edeb
commit
da59354bb7
@ -8,7 +8,7 @@ export const useChangeRequestConfig = (projectId: string) => {
|
||||
const { isOss } = useUiConfig();
|
||||
const { data, error, mutate } = useSWR<IChangeRequestEnvironmentConfig[]>(
|
||||
formatApiPath(`api/admin/projects/${projectId}/change-requests/config`),
|
||||
isOss() ? () => Promise.resolve([]) : fetcher
|
||||
(path: string) => (isOss() ? Promise.resolve([]) : fetcher(path))
|
||||
);
|
||||
|
||||
return {
|
||||
|
@ -14,7 +14,7 @@ export const usePendingChangeRequests = (project: string) => {
|
||||
const { isOss } = useUiConfig();
|
||||
const { data, error, mutate } = useSWR<IChangeRequest[]>(
|
||||
formatApiPath(`api/admin/projects/${project}/change-requests/pending`),
|
||||
isOss() ? () => Promise.resolve([]) : fetcher
|
||||
(path: string) => (isOss() ? Promise.resolve([]) : fetcher(path))
|
||||
);
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user