Skip to content

Commit

Permalink
Moving new method up (before it's called)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitor-Avila committed Jul 3, 2024
1 parent 15567d5 commit 97e6cc0
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions superset-frontend/src/views/CRUD/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,23 +185,6 @@ export const getUserOwnedObjects = (
endpoint: `/api/v1/${resource}/?q=${getParams(filters, selectColumns)}`,
}).then(res => res.json?.result);

export const getRecentActivityObjs = (
userId: string | number,
recent: string,
addDangerToast: (arg1: string, arg2: any) => any,
filters: Filter[],
) =>
SupersetClient.get({ endpoint: recent }).then(recentsRes => {
const res: any = {};
return getFilteredChartsandDashboards(addDangerToast, filters).then(
({ other }) => {
res.other = other;
res.viewed = recentsRes.json.result;
return res;
},
);
});

export const getFilteredChartsandDashboards = (
addDangerToast: (arg1: string, arg2: any) => any,
filters: Filter[],
Expand Down Expand Up @@ -232,6 +215,23 @@ export const getFilteredChartsandDashboards = (
});
};

export const getRecentActivityObjs = (
userId: string | number,
recent: string,
addDangerToast: (arg1: string, arg2: any) => any,
filters: Filter[],
) =>
SupersetClient.get({ endpoint: recent }).then(recentsRes => {
const res: any = {};
return getFilteredChartsandDashboards(addDangerToast, filters).then(
({ other }) => {
res.other = other;
res.viewed = recentsRes.json.result;
return res;
},
);
});

export const createFetchRelated = createFetchResourceMethod('related');
export const createFetchDistinct = createFetchResourceMethod('distinct');

Expand Down

0 comments on commit 97e6cc0

Please sign in to comment.