replace lodash/fp

This commit is contained in:
Ramón Souza 2023-03-02 10:05:41 -03:00
parent eacf96b5f2
commit 3804c8b57e

View File

@ -4,7 +4,6 @@ import { makeCall } from '/imports/ui/services/api';
import Auth from '/imports/ui/services/auth'; import Auth from '/imports/ui/services/auth';
import Users from '/imports/api/users'; import Users from '/imports/api/users';
import UserListService from '/imports/ui/components/user-list/service'; import UserListService from '/imports/ui/components/user-list/service';
import fp from 'lodash/fp';
import UsersPersistentData from '/imports/api/users-persistent-data'; import UsersPersistentData from '/imports/api/users-persistent-data';
import { UploadingPresentations } from '/imports/api/presentations'; import { UploadingPresentations } from '/imports/api/presentations';
@ -175,11 +174,11 @@ const getLastBreakoutInserted = (breakoutURLArray) => breakoutURLArray.sort((a,
return a.breakoutUrlData.insertedTime - b.breakoutUrlData.insertedTime; return a.breakoutUrlData.insertedTime - b.breakoutUrlData.insertedTime;
}).pop(); }).pop();
const getLastBreakoutByUserId = (userId) => fp.pipe( const getLastBreakoutByUserId = (userId) => {
getBreakoutByUserId, const breakout = getBreakoutByUserId(userId);
getWithBreakoutUrlData(userId), const url = getWithBreakoutUrlData(userId)(breakout);
getLastBreakoutInserted, return getLastBreakoutInserted(url);
)(userId); }
const getBreakouts = () => const getBreakouts = () =>
Breakouts.find({}, { sort: { sequence: 1 } }).fetch(); Breakouts.find({}, { sort: { sequence: 1 } }).fetch();