in app/services/PlutoCore.ts [29:49]
async function GetMyRecentOpenProjects(
wantedCount: number
): Promise<[PlutoProject[], PlutoAuditLog[]]> {
//we get the default number, even though we want less; this is to de-duplicate on the item id and still meet our wanted count
const response = await axios.get<PlutoCoreListResponse<PlutoAuditLog>>(
`/pluto-core/api/history/my/actions?actionType=OpenProject&limit=${wantedCount}`
);
const deDuped = dedupeAuditLogs(response.data.result, wantedCount);
const projectInformationPromise = Promise.all(
deDuped.map((event) =>
axios.get<PlutoCoreResponse<PlutoProject>>(
`/pluto-core/api/project/${event.targetObjectId}`
)
)
);
const projectInformation = await projectInformationPromise;
return [projectInformation.map((proj) => proj.data.result), deDuped];
}