Skip to content

Conversation

StyleT
Copy link
Contributor

@StyleT StyleT commented Oct 29, 2020

No description provided.

@StyleT StyleT requested review from nightnei and oleh-momot October 29, 2020 09:59
@@ -7,10 +7,17 @@ import db from '../../db';
import preProcessResponse from '../../common/services/preProcessResponse';

const getApps = async (req: Request, res: Response): Promise<void> => {
const apps = await db.select().from('apps');
let filters = req.query.filter ? JSON.parse(req.query.filter as string) : {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure that we have to use let here because no chances are it can be changed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

export const prepareAppRoutesToRespond = _.compose(
prepareRoutesWithSlotsToRespond,
);
export const prepareAppRoutesToRespond = (v: any[]) => v.map(row => prepareRouteToRespond(row))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may use _.map here
export const prepareAppRoutesToRespond = _.map(prepareRouteToRespond)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think use of native method is better

@StyleT StyleT merged commit fa62ca9 into master Oct 29, 2020
@StyleT StyleT deleted the feature/registry_api_fixes branch October 29, 2020 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants