Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature/registry api fixes #222

Merged
merged 4 commits into from
Oct 29, 2020
Merged

Feature/registry api fixes #222

merged 4 commits into from
Oct 29, 2020

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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants