-
Notifications
You must be signed in to change notification settings - Fork 44
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
Conversation
@@ -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) : {}; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
No description provided.