diff --git a/superset-frontend/src/views/CRUD/utils.tsx b/superset-frontend/src/views/CRUD/utils.tsx index 6fee140296de..7b9274a90446 100644 --- a/superset-frontend/src/views/CRUD/utils.tsx +++ b/superset-frontend/src/views/CRUD/utils.tsx @@ -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[], @@ -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');